how could I test a string against only valid characters like letters a-z?...
string name; cout << \"Enter your name\" cin >> name; string lette
C++11 approach using std::all_of:
C++11
std::all_of(std::begin(name), std::end(name), [](char c){ return std::isalpha(c); });
std::all_of will only return true if all of the elements are true according to the supplied predicate function.