"Else without a previous if"

"Else without a previous if"

本文关键字:if previous without Else      更新时间:2023-10-16

你好,我是一名入门程序员,请帮我做这个!错误"Else without a previor if"

cin >> input1;
if (input1 == "Story");
{
    goto Story;
}
else;
{
    if (input1 == "Creator");
    {
        goto Creator;
    }
}
goto start;
Story:
system("cls");

删除垃圾分号。

cin >> input1;
if (input1 == "Story") // remove from here
{
    goto Story;
}
else // remove from here
{
    if (input1 == "Creator") // remove from here
    {
        goto Creator;
    }
}
goto start;
Story:
system("cls");