Change a variable during loop

Is there a way to change a variable inside a while loop so that each time it loops the variable is updated with the new information that can be keyed in.

I have a console app and what I am wanting to do is have the for loop repeat x amount of times before moving on to the next for loop to complete the required amount of times. eg. I want it to repeat a total of 200 times, starting with x amount of times then 200-x amount of times. I then have this process repeating indefinately.

I want to be able to change the variable x occasionally and then have it reflected in the loop. However I want the loop to carry on constantly. I have got it working to loop continuously how I want on a fixed value, but can't get it to allow me to change it without interupting it.

Could I have a input command run while the loop is executing in the background.

Sorry for the confusion,
Thanks in advance,
Michael

So, basically, you want to be able to perform user input while still doing processing, right?
That's only possible through multithreading. Not exactly something for a beginner, but not really hard, either.
Boost has facilities for portable threading.
Topic archived. No new replies allowed.