for(int i = 0; i < lastName.length(); i++)
if(!isalpha(lastName[i]) && lastName[i] != "-" )// <-- error is here
The point is to check the string character by character to make sure it is either a letter or a hyphen. The record contains several different residents, and passing each in one at a time or copying each record to a local 'resident' (struct) both seem like really poor ways of getting around this comparison thing.
Help?
C++ forbids comparison between pointer and integer