记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:11:31: error: expected primary-expression before ‘=’ token
   11 |         {       if (year%100!==0&&year%4==0)
      |                               ^
foo.cc:14:30: error: unable to find numeric literal operator ‘operator"";’
   14 |                         lead=0;
      |                              ^~~
foo.cc:14:30: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
foo.cc:16:38: error: lvalue required as left operand of assignment
   16 |         if (month=4||month=6||month=9||month=11)
      |                                     ~^~~~~~~
foo.cc:19:74: error: lvalue required as left operand of assignment
   19 |         {       if (month=1||month=3||month=5||month=7||month=8||month=10||month=12)
      |                                                                        ~~^~~~~~~
foo.cc:22:33: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   22 |                         if (lead=1)
      |                             ~~~~^~
foo.cc:28:18: error: expected ‘}’ at end of input
   28 |         return 0;
      |                  ^
foo.cc:5:1: note: to match this ‘{’
    5 | {
      | ^

信息

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