标签:value fine declared for can tle ret attribute stack
编译错误 1:
error: variably modified ‘stack1‘ at file scope
出现错误代码段:
const int MaxSize 50; int id[MaxSize];
修改方法:
#define MaxSize 50 int id[MaxSize];
编译错误 2:
warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wun
出现错误代码段:
int m, n; //第一种 scanf("%d", &m); //第二种 for(int i = 0; i < n; i++) { scanf("%d", &m); }
修改方法:
int m, n; //第一种 if (scanf("%d", &m)) { /* code */ } //第二种 for(int i = 0; i < n; i++) { if (scanf("%d", &m)) { /* code */ } }
未完待续。。。
标签:value fine declared for can tle ret attribute stack
原文地址:https://www.cnblogs.com/flow-wangqi/p/9563335.html