I am tring to write a program that takes a input char and if it is lower case changes it to capital, then outputs the value. If it is already capital it just outputs the value. this is what i was thinking but it isnt working.
#include<iostre am>
#include<cctype >
using namespace std;
int main()
{
char a;
cin >> a
while (cin.get(chr))
{
int toupper(a);
static_cast<cha r>(int) toupper(a));
cout << a;
}}
i guess my real problem is i really dont understand how the get function works with the int toupper.
#include<iostre am>
#include<cctype >
using namespace std;
int main()
{
char a;
cin >> a
while (cin.get(chr))
{
int toupper(a);
static_cast<cha r>(int) toupper(a));
cout << a;
}}
i guess my real problem is i really dont understand how the get function works with the int toupper.
Comment