View Single Post
Old May 20th, 2006, 10:49 PM   #1
tumbleTetris
Programmer
 
Join Date: May 2006
Posts: 39
Rep Power: 0 tumbleTetris is on a distinguished road
how can x be a valid choice in type int?

I'm making a menu, it has 3 choices, the last is x which is cancel.

I don't understand how I can get the computer to understand x as an x since I have

int choice = keyboard.nextInt();

and I know that it won't except anything of type 'char'.

The menu looks something like this:

1. Choice A
2. Choice B
x. Cancel
tumbleTetris is offline   Reply With Quote