记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:11:20: error: 'y' was not declared in this scope
  for(int k=y1;k<y2;y++)
                    ^
foo.cc:13:19: error: 'd' was not declared in this scope
  sum=sum+Gd(y2,m2,d);
                   ^
foo.cc:13:19: note: suggested alternative: 'd2'
  sum=sum+Gd(y2,m2,d);
                   ^
                   d2
foo.cc:15:11: error: 'y' was not declared in this scope
  cout<<Gd(y)<<m1(d)<<endl;
           ^
foo.cc:15:11: note: suggested alternative: 'y2'
  cout<<Gd(y)<<m1(d)<<endl;
           ^
           y2
foo.cc:15:19: error: 'm1' cannot be used as a function
  cout<<Gd(y)<<m1(d)<<endl;
                   ^
foo.cc:9:12: warning: unused variable 'd2' [-Wunused-variable]
  int y2,m2,d2;
            ^~

信息

递交者
类型
递交
题目
A1-4 分支结构练习:今年过去了多少天
比赛
2020苏青奥赛集训营(2021-1-31课堂小练)
语言
C++
递交时间
2021-01-31 12:57:19
评测时间
2021-01-31 12:57:19
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes