i can't figure out how to solve this error, i've searched online, but any solutions i've found use terms that are beyond me (as i am still a beginner at C++)..so it's been a little tricky to crack this. basically all i'm trying to do here is find the length of newPin, and check to make sure this length is equal to 4. if there's any other way to accomplish this, that'd be great. but otherwise, if there is an easy solution here, i'd love to see it. so here's a snippet of my code and the lovely error that accompanies it.
string GetNewPin(string) {
do {
cout << "Enter new PIN number: ";
cin >> newPin;
} while(int(newPin.length) != 4);
return newPin;
}
h:\pa4\part2.cpp(98): error C2228: left of '.length' must have class/struct/union type