I am looking for a method to convert a string represent of an integer (say, "123") to an integer in C++03.
I am aware about the usual method of using
cout<<"Int token is: "<<tokenInt<<"\n";
You're almost there. After you do the conversion you need to check if there is any data left in the stream. If there is then you know you had invalid input. So if
true then you consumed on the input and you have a valid result. If not then you have invalid input.