Hi,
I am having trouble with this line of code:
cout << "Lower to upper: t" << toupper(str);
The str is underlined and it won't compile.
Code:
#include<iostream>
#include<string>
#include<cctype>
using namespace std;
void upr(const string & str);
int main()
{
string strinpt;
char quit = 'Q';
while (quit != 'q')
{
cout << "Enter phrase in lower case to be turned into upper case: " << "\n";
getline(cin, strinpt);
upr(strinpt);
cout << "Do you want stop entry? " << "\n";
cin >> quit;
}
return 0;
}
void upr(const string & str)
{
cout << "OutPut: " << str << "\n";
cout << "Lower to upper: t" << toupper(str);
}
Any help would be appreciated.