1 | initial version |
you can't assume, there's always something in your vector, so you need to care for the case it's empty:
if (points.size() > 0) { points[0].x points[0].y }
2 | No.2 Revision |
you can't assume, there's always something in your vector, so you need to care for the case it's empty:
if (points.size() > 0)
{
points[0].x
points[0].y