restarting a test program from beginning

OK very new to C++ and i know i will learn this later. I take a test and run it and then tinker with it to try to add more. So i was wondering (to save some time) what source code would reset the program without exiting out of the program?
I think what you're looking for is a loop.

you could do something like this:

while(input is not the terminator)
run program

very simple demo:

1
2
3
4
5
6
string terminator = "stop";

do{
	cin>>demo;
	cout<<demo;
}while(demo != terminator);

Last edited on
thanks
Topic archived. No new replies allowed.