Looping Program

How do I make my program restart from the beginning after it the user presses enter after the program is done?
In the conio.h header...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
#include <conio.h>

using namespace std;

int main()
{
     while(true)
     {
          cout << "Say something" << endl;
          getch();
     }
     return 0;
}
so the "getch();" makes it start at the beggining?
No, placing everything in between 'while(true){ Your Code }' makes it start at the beginning.
getch() just gives you a pause before it restarts.
oh ok
Topic archived. No new replies allowed.