记录详情

Compile Error

/in/foo.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
/in/foo.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
/in/foo.c: In function 'main':
/in/foo.c:6:9: error: 'cin' undeclared (first use in this function)
    6 |         cin>>y>>m;
      |         ^~~
/in/foo.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:14:22: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   14 |              if(y%4=0&&y%100!=0||y%400=0)
      |                     ~^~~~~~~~~~
/in/foo.c:14:39: error: lvalue required as left operand of assignment
   14 |              if(y%4=0&&y%100!=0||y%400=0)
      |                                       ^
/in/foo.c:20:21: error: expected ';' before '}' token
   20 |                 d=28
      |                     ^
      |                     ;
   21 |                 }
      |                 ~    
/in/foo.c:27:9: error: 'cout' undeclared (first use in this function)
   27 |         cout<<"m="<<m<<endl;
      |         ^~~~
/in/foo.c:27:24: error: 'endl' undeclared (first use in this function)
   27 |         cout<<"m="<<m<<endl;
      |                        ^~~~
/in/foo.c:5:13: warning: variable 'd' set but not used [-Wunused-but-set-variable]
    5 |     int y,m,d;
      |             ^

信息

递交者
类型
递交
题目
A1-3 分支结构练习:月份天数
比赛
2025程序设计与竞赛作业赛第一场(整装出发)
语言
C
递交时间
2025-09-27 20:08:06
评测时间
2025-10-03 02:14:56
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes