记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:9:28: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions]
    9 |                         if(a%400==0)
      |                            ^
foo.cc:9:35: error: unable to find numeric literal operator ‘operator"")’
    9 |                         if(a%400==0)
      |                                   ^~~
foo.cc:9:35: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
foo.cc:11:25: error: expected primary-expression before ‘else’
   11 |                         else
      |                         ^~~~
foo.cc:10:32: error: expected ‘)’ before ‘else’
   10 |                            c=1;
      |                                ^
      |                                )
   11 |                         else
      |                         ~~~~    
foo.cc:9:27: note: to match this ‘(’
    9 |                         if(a%400==0)
      |                           ^
foo.cc:7:11: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
    7 |         if(a%4==0)
      |           ^
foo.cc:22:50: error: lvalue required as left operand of assignment
   22 |                                if(b==4||b==6||b=9||b=11)
      |                                                 ~^~~

信息

递交者
类型
递交
题目
A1-3 分支结构练习:月份天数
语言
C++
递交时间
2024-08-21 16:41:38
评测时间
2024-08-21 16:41:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes