The book just went over what toupper did, which was capitalize letters. It didnt show an example of how to use them(this was during the beginning of the book). Im almost done with the book with only 1 chapter left, and it still hasnt gone over how to use toupper, and I feel like it might be important to know.
Ive tried using different codes to make it work. This was the only one that worked.
1 2 3 4 5 6 7 8 9 10 11 12
#include <iostream>
#include <string>
#include <vector>
usingnamespace std;
int main()
{
char d = 'a';
cout << toupper(d);
}
It works, but instead of putting "A", it puts "65" in the output. Please explain why it does this, and how to use toupper.