I'm having a problem with cin.get().
I'm prohibiting the user, that he can only enter 5 keys.
and each key does something, like a MENU.
Press 1, if you want this, etc.
char choice[5];
cout<<"ENTER YOUR CHOICE"<<endl;
cin.get( choice, 5);
switch (choice)
Okay, when I run this, the compiler gives me an error on switch (choice).
so I did,
switch (choice[0], choice[1], choice[2], choice[3], choice[4])
and that didn't give me a compiler error, but would this be correct?
Because when I run it. I can still key more than 5 letters.