c语言中else语句需要与_错误:C语言中“ else”之前应有“}”

c语言中else语句需要与

Error: Expected '}' before 'else' occurs, if closing scope curly brace of if statement is missing.

错误: 如果缺少if语句的关闭范围大括号, 则 在'else'之前应有''

Consider the code:

考虑一下代码:

#include 

int main() 
{
   
	int a = 10;
	
	if(a == 10)
	{
   
		printf("Yes!\n");
	else
	{
   
		printf("No!\n");
	}
	
	return 0;
}

Output

输出量

prog.cpp: In function ‘int main()’:
prog.cpp:10:2: error: expected ‘}’ before ‘else’
  else
  ^~~~

How to fix?

怎么修?

See the code, closing curly brac

你可能感兴趣的:(mysql,python,c语言,c++,debug)