I need to convert a string in C++ to full upper case. I\'ve been searching for a while and found one way to do it:
#include #include
Try this small program, straight from C++ reference
#include #include #include #include #include using namespace std; int main() { string s; cin >> s; std::transform(s.begin(), s.end(), s.begin(), std::ptr_fun(std::toupper)); cout << s; return 0; }
Live demo