A question about inputing.

Hi,

I want to make a program that takes unknown by number commands from the user and I want the new line to be like the thing that makes the loop that takes the commands to ends. I mean if the user entered only new line = > the commands are done and the program is ready to continue.

something like:
1
2
3
4
5
6
7
8
9
10
11

do
{
cin>>randomString;

//here I do what I do with it

}

while( I don't know how to end this I want to end if the user only have pressed "Enter" otherwise repeat the loop);
 
Last edited on
I am sorry I don't know what does this have common with a menu list ? I am not sure you understood what I want exactly.
 
while ( randomString != "" )
Give me an example of what do you want. From what i understood:
- user can input numbers only
- when he is done he just apply empty space

And that is typical menu list :0 (maybe some, since some have other exit char - but that is just another ascii code)
Topic archived. No new replies allowed.