I am very new to C++. I am just learning and wanted to make a simple program that capitalizes the input. What is wrong with this? I use Bloodshed Dev-C++. I get this error:
no matching function for call to `toupper(std::s tring&)'
candidates are: int toupper(int)
no matching function for call to `toupper(std::s tring&)'
candidates are: int toupper(int)
Code:
#include <cstdlib> #include <iostream> #include <string> using namespace std; int main(int argc, char *argv[]) { while( true ) { cout << "fire> "; string cmd; getline(cin, cmd); string upp; upp = toupper(cmd); cout << upp << endl << endl; } return EXIT_SUCCESS; }
Comment