Accessing elements in vectors in a vector | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Accessing elements in vectors in a vector

I know that it is possible in c++ to have a std::vector containing std::vectors but i don't know how to access the elements in those vectors. Is there a way to access them?

24th Apr 2018, 9:20 PM
MMJ
1 Answer
+ 3
OuterVector[indexOfInner][indexOfElement]
24th Apr 2018, 9:44 PM
Ariela
Ariela - avatar