记录详情

Compile Error

/in/foo.cc: In member function 'bool Date::isLeap(int)':
/in/foo.cc:9:40: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    9 |                 return y%400==0||y%4==0&&y%100==0;
      |                                  ~~~~~~^~~~~~~~~~
/in/foo.cc: In member function 'void Date::addDate(int)':
/in/foo.cc:21:43: error: 'yesr' was not declared in this scope; did you mean 'year'?
   21 |                         day-=YearMonthDay(yesr,month);
      |                                           ^~~~
      |                                           year

信息

递交者
类型
自测
题目
P1003 OO1-3 日期类Date
语言
C++
递交时间
2025-03-14 20:13:35
评测时间
2025-03-14 20:13:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes