C++ Vector Notes

arr.at(i): Gives Exceptions upon illegal memory access

arr.reserve(10): Reserves at least 10 units of memory,

To pass a vector as an array, pass the address of the first element of the vector

Only push_back() and resize() can invalidate pointers handled by vectors

Advertisements