how to access each item in a vector in c++ code example
Example: cpp access vector by index
std::vector<int> vecOfNums{ 1, 4, 5, 22, 33, 2, 11, 89, 49 };
// Access element at index 3
int & element = vecOfNums[3];
std::vector<int> vecOfNums{ 1, 4, 5, 22, 33, 2, 11, 89, 49 };
// Access element at index 3
int & element = vecOfNums[3];