That would be correct. Remember that indices in C++ start at zero. So a vector or array with dimension n has elements with valid indices from 0 to n-1.
In your example, someVector would correspond to the 6th vector<float> in someVector (0 is first, 1 is second, .... 5 is sixth). someVector corresponds to the 101st float within someVector. There is no check by a vector or array as to whether indices are valid, and it is the programmer's responsibility to ensure they are. Hence the use of the at() method which Elysia mentioned - that throws an exception at run time if given an invalid.
So don't do this
x does not exist. Invoking x.push_back() invokes undefined behaviour according to the C++ standard. Practically, that often tromps some random area of memory, which results in a program crash. However, the compiler cannot check that .... it is the programmer's responsibility.Code:std::vector<std::vector<float> > x(5); x.push_back(2.0f);