I’m not sure why this is causing me trouble, I think I did it earlier in a test and it worked fine.
I get some user input using cin then pass this to another method as a char. I then just wanted to say:
if(userInput == '!'){
//do Something
}
But it didn’t get it, so I tried defining a char as:
const char myChar ='\u033f';
if(guess == myChar){
exit(0);
}
But this just gives me a few compile errors even thou I’m getting that from another StackOverflow thread.
I must be misunderstanding something fundamental here, could someone enlighten me?
TIA
The following example works for me:
Perhaps if your question is clarified a little more, I can edit this answer to be a little more complete.