Compile Error

foo.cc: In function ‘int main()’:
foo.cc:12:33: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
   12 |                                 else
      |                                 ^~~~
foo.cc:13:52: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
   13 |                                         cout<<"28";break;
      |                                                    ^~~~~
foo.cc:14:35: error: expected ‘;’ before ‘}’ token
   14 |                 defaulf:cout<<"31"
      |                                   ^
      |                                   ;
   15 |         }
      |         ~                          
foo.cc:16:17: error: expected ‘;’ before ‘}’ token
   16 |         return 0
      |                 ^
      |                 ;
   17 | }
      | ~                
foo.cc:14:17: warning: label ‘defaulf’ defined but not used [-Wunused-label]
   14 |                 defaulf:cout<<"31"
      |                 ^~~~~~~

信息

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