Thread: dumb if and case stuff...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4

    dumb if and case stuff...

    I'm sure this will be simply for most people here..when I'm using if statements or switch case, how can I make it use a char as the input. when ever I try to use a letter instead of a number it says "undeclared identifier" Can you please keep it fairly simply, I really don't know much about C++...I'm using microsoft visual C++

  2. #2
    maybe this will help
    when you compare a variable with an char you should place the char between ' '
    like this:

    if(input == 'a')

    I hope this is what you mean.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    4

    Thumbs up

    cool, that was it. Thanks simple too

Popular pages Recent additions subscribe to a feed