📜  如何在完成后重新启动 C++ iostream 程序 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:52.798000             🧑  作者: Mango

代码示例1
if (whatever condition)
    correct();
else
{
    incorrect();
    cout << "Enter y to restart: ";
    char c;
    cin >> c;
    if (c == 'y')
        continue;
    else
        return 1;
}