Hello all, I am having a mental blank on checking user input (that is string) to check if it contains an integer value. as in:
for(i=0;i < nNames; i++){
cout<<"\nEnter a last name: ";
getline(cin,name[i]);
I have checked the C++ string class for string.length() and others, I am just not getting a idea of checking if it is a number/integer to cout a "that is not a alpha character."
Basically if(name != a string) or if(name == an int) type idea. - Could someone shed some light or some idea to point me in the right direction please? Thanks to all for any ideas : )