I Just started programming C last week using Beginnning C++ programming which I must say is excellent. I have a basic grounding in PHP and did some Java in college so am moving through the book at quite a pace but im stuck on one of the exercise questions on Vectors,iterators and the erase member function so I joined up here to ask what will probably be the first of many questions and her e it is:
Im trying to match user input against a string object contained in a vector and erase that object but I get compile errors. Can anyone put me right? Heres the relevant code snippit....
Code:for(myIterator = games.begin(); myIterator < games.end(); ++myIterator) temp = *myIterator; if (gameEntered == temp) games.erase(myIterator); cout << "Game removed.\n\n" << endl; else out << "No match.\n\n" << endl;