I have this from a reference code, and I figured it'd be useful and interesting if I could change the const char phrase to maybe a string that the user can enter, and it still complete the following function.
Is this possible?
1 2 3 4 5 6 7 8 9
constchar phrase[] = "Any text to be entered";
std::cout << '"' << quote << "\"\n";
// single character:
std::cout << "begins with uppercase? : ";
std::cout << std::boolalpha;
std::cout << std::use_facet< std::ctype<char> >(loc).is (std::ctype<char>::upper, phrase[0]);
std::cout << '\n';
The first method worked, but I tried some alterations and couldn't get it to work as a string, since it is checking for the first character in the char type variable to see if it is upper.