编程语言
首页 > 编程语言> > C:错误: C++ style comments are not allowed in ISO C90

C:错误: C++ style comments are not allowed in ISO C90

作者:互联网

错误

memory.c:1:12: error: initializer element is not constant
memory.c:1:23: error: C++ style comments are not allowed in ISO C90
  char *d = malloc(-1);//1000);
                       ^
memory.c:1:23: error: (this will be reported only once per input file)

原因

在ISO C90标准里,双斜杠不是注释的格式。在后续的版本才出现的注释格式。这个错误只报一次。

标签:style,C90,allowed,memory,C++,ISO,error
来源: https://blog.csdn.net/qq_36428903/article/details/121449111