记录详情

Compile Error

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

信息

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