help with case switching or char
can u use char with case switches or is there something you can do that is similar (i.e)
Code:
#include <iostream>
using namespace std;
int main();
{
char a;
cout "please choose a-c\n";
cout "input :";
cin.get();
cin>> a;
switch ( a )
{
case a:
cout<<"a";
cin.get();
break;
case b:
cout<<"b";
cin.get();
break;
case c:
cout<<"c";
cin.get();
break;
}
}
ok, i know this doesn't work cause i've tried it, but as an example i think you can see what i'm trying to do. if you have any input please, do tell!!