"Else without a previous if"
"Else without a previous if"
你好,我是一名入门程序员,请帮我做这个!错误"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");
相关文章:
- 我的简单if-else语句是如何无法访问的代码
- 如何将enable-if与模板参数和参数包一起使用
- 无论条件是否为true,if总是在c++中执行
- Arduino:for/while/if在void setup()或void loop()之前?——错误:之前需要不合格
- Insert函数不适用于2 if语句C++
- If语句未被求值C++
- C++嵌套if语句,基本货币交换
- 多个If语句与使用逻辑运算符计算条件的单个语句的比较
- 是否可以使用if constexpr删除控制流语句
- 要与"if constexpr"一起使用的编译时消息(在预处理器之后)
- 如何删除peer if else分支中的冗长句子
- 我似乎对if/else的基本语句有问题:/
- if数组上的随机数
- 将按位if条件转换为普通if条件
- If语句在c++中被忽略
- 比较if语句中的数组值和int值
- 使用if-else将数字转换为单词
- "Else without a previous if"
- 简单的C++错误,"else without previous if"
- 为什么我在 for 循环中收到'Else without previous if'错误?