Check out example codes for "c++ iterate over vector of pointers". It will help you in understanding the concepts better.

Code Example 1

for (vector<int Type>:: iter = myVector.begin(); iter != myVector.end(); iter++)
   (*iter)->display();

Learn ReactJs, React Native from akashmittal.com