Newby Question

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

I have a console application that I am trying to build that is looking for
the users input. I have declared one of my variables as char and the user
has to select a category code from a list. The Category codes are C through
H and AA, BB and CC. When I try to run the program, I get the error: Too
many characters in character literal. The error is on the line where I have
the AA, BB, CC enter. You can't use = = to check the variable with a char
or string, so what must I do to be able to verify the the users input for
these values???

Brian
 
Hi Brian,

It would probably work better if you made your variable a string, which can
hold multiple characters such as AA or BB.

Joe
 
Thanks, I just tried that and it worked.

Joe Mayo said:
Hi Brian,

It would probably work better if you made your variable a string, which
can
hold multiple characters such as AA or BB.

Joe
 
Back
Top