记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:10:24: warning: the address of 'std::ios_base& std::right(ios_base&)' will never be NULL [-Waddress]
   10 |                 leap = right;
      |                        ^~~~~
In file included from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/ios:42,
                 from /nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/ostream:38,
                 from iostream:39:
/nix/store/1x1q5sqa0ilbi8fz7aayk02pjy5g7jhh-gcc-12.3.0/include/c++/12.3.0/bits/ios_base.h:1050:3: note: 'std::ios_base& std::right(ios_base&)' declared here
 1050 |   right(ios_base& __base)
      |   ^~~~~
foo.cc:24:17: error: expected '(' before '\U0000ff08month'
   24 |         else if (month == 1 || month == 3|| month == 5 || month == 7 || month ==  8 || month == 10 || month == 12)
      |                 ^~~~~~~
      |                 (
foo.cc:28:9: error: 'else' without a previous 'if'
   28 |         else
      |         ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

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