Is there a simple way to convert the char choice from a lower case q to upper case Q?
I've tried the c version of toupper but I can't get it to work in C++. I need it that all the characters typed in will be upper case; so, they link to the choice selection of choice in main.
for example if they type in c it is turned to C and the function that C is linked to can be accessed or used.
Code so far without any change:
include <iostream>
#include <stdlib.h>
#include <string>
#include "link.h"
using namespace std;
int main()
{
link obr;
string n;
long int x;
char choice;
do{
cout << "C: Create/Add\n P: Display\nQ: Quit";
cin >> choice;
if(choice == 'C'){
cout << "Name";
cin >> n;
cin >> x;
obr.push(n,x);
}
if (choice == 'P'){
obr.display();
}
} while(choice != 'Q');
return 0;
}