i'm trying to read from a text file and store it into a STL List. i able to read from the file but when i wanted to print out my list i get an error - primary-expression before '>' token which is pointed to the text in red. am i doing it wrongly?
fin >> list;
if(list != "//")
{
cout << list << endl;
myList.push_back(list);
list<string>::iterator p = myList.begin();
while(p != myList.end())
{
cout << *p;
p++;
}
}