解决 :error C2143: syntax error : missing ‘)‘ before ‘;‘

  • Post author:
  • Post category:其他




解决 :error C2143: syntax error : missing ‘)’ before ‘;’



问题描述:


提示:运行编译运行C语言的文件时出现,error C2143: syntax error : missing ‘)’ before ‘;’




原因分析:


提示:error C2143: syntax error : missing ‘)’ before ‘;’

error C2143: syntax error : missing ‘)’ before ‘;’是什么错误,找遍了却没发现问题




解决方案:


这些宏定义,把最后的分号都去掉,不然代入的时候会带个分号的。

#include <stdio.h>

#include <stdlib.h>

#include <malloc.h>


#define initSize 10

// #define initSize 10;



将分号;去掉即可。



版权声明:本文为qq_45507472原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。