Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to make a c++ iostream program restart when finished

if (whatever condition)
    correct();
else
{
    incorrect();
    cout << "Enter y to restart: ";
    char c;
    cin >> c;
    if (c == 'y')
        continue;
    else
        return 1;
}
Source by www32.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #iostream #program #restart #finished
ADD COMMENT
Topic
Name
3+4 =