Check out example codes for "c++ iterate through constant list". It will help you in understanding the concepts better.

Code Example 1

const list<int> numbers;
for(list<int>::const_iterator it = numbers.begin(); it != numbers.end(); it++)
    cout << *it << endl;

Learn ReactJs, React Native from akashmittal.com