comment

Action executed in 0.000

Extended Kilmer Day

tags:

Due to the snow, the late buses came even later, so i had an extra 20 minutes with the kids today. We're working on our first project. It's a thing manager. So for some students it will be a CD manager, for some a movie manager, for some, a class manager, etc. See the parent of this comment for pictures.

Our first hurdle was this.

int Command;

printMenu();
cin >> Command;
while (Command != 6)
   {
   // Do stuff.
   printMenu();
   cin >> Command;
   }

If your command is not a number, you have an infinite loop.

parent post: Photos at Kilmer Middle School
notify me: yes

Comments

code snippet

I'm having trouble seeing why that'd be an infinite loop. Would the cin >> Command; not re-prompt the user after some non-number is entered the same as it would after some non-6 number is entered?
parent post: Extended Kilmer Day
notify me: yes

Post a Comment

* indicates a required field
anonymous (If you want to identify yourself, please sign in first.)
required This field is required.

Max size is 2 MB, aspect ratio 3:4 width:height
required This field is required.
Please include a short description.
required This field is required.

480 characters remaining.
is public

(Use this field if you have to. 3000 characters remaining.)
1 nickel, 2 pennies + 100

Trackback URL

http://derocher.org/~brian//trackback.php?ParentId=1237

form