Noob here,
I am trying to display a list of a vector with ascending numbers. To display the list I iterate through the following code.
cout << "\nYour games list is: \n";
for (iter = gameTitle.begin(); iter != gameTitle.end(); ++iter)
{
cout << listNum << ".- " << *iter << endl;
}
So listNum is an integer that I initialized as "0" but this particular setup will give me a list with three elements as follows.
3.- userInput
3.- userInput
3.- userInput
"userInput" is a vector of string type that is declared yet not initialized.
¿How do I get a list like follows?
1.- userInput
2.- userInput
3.- userInput
etc.
Thanks