how could I test a string against only valid characters like letters a-z?...
string name;
cout << \"Enter your name\"
cin >> name;
string lette
I would suggest investigating the ctype library: http://www.cplusplus.com/reference/std/locale/ctype/
For example, the function is (see ctype.is) is a way to check properties on letters in locale sensitive manner:
#include
using namespace std;
bool is_alpha(char c) {
locale loc;
bool upper = use_facet< ctype >(loc).is( ctype::alpha, quote[0]);
return upper;
}