I would use tolower() and toupper() like MiiNiPaa suggested. Here is a example, you iterator through the string and convert each character to uppercase or lowercase character by character. You can do this by using a iterator or using indexes.
#include <iostream>
#include <string>
#include <cctype>
usingnamespace std;
int main ()
{
string words ("Hello how are you");
cout << "Normal: " << words << endl;
for (string::iterator it = words.begin(); it != words.end(); ++it)
*it = toupper(*it);
cout << "All Upper case: " << words << endl;
for (string::size_type i = 0; i != words.size(); ++i)
words[i] = tolower(words[i]);
cout << "All lower case: " << words << endl;
return 0;
}
I was thinking about showing ranged based loops in the example but didn't want to complicate it to much for the OP since he is still learning (I believe though I might be wrong), and because of the possibility that he is using a non C++11 compiler.
If your c/c++ compiler isnt using the ASCII character set, you've got issues.
Welcome to the world of pain locale codepages: http://en.wikipedia.org/wiki/Code_page_866 or "standard" http://en.wikipedia.org/wiki/KOI8-R — look at the letter 'Ё' (B3) and switched order of lowercase-uppercase letters in english and russian.
Also in local train station display controller uses codepage like "'\0' 1234567890AaBbCc/*...*/АаБбВв/*...punctuation and other*/"