记录详情

Compile Error

/in/foo.cc: In member function 'void Date::Diff(int)':
/in/foo.cc:14:35: error: no matching function for call to 'Date::YearInMonth(int&)'
   14 |                 if(day>YearInMonth(month))
      |                        ~~~~~~~~~~~^~~~~~~
/in/foo.cc:25:13: note: candidate: 'int Date::YearInMonth()'
   25 |         int YearInMonth()
      |             ^~~~~~~~~~~
/in/foo.cc:25:13: note:   candidate expects 0 arguments, 1 provided
/in/foo.cc:16:41: error: no matching function for call to 'Date::YearInMonth(int&)'
   16 |                         day-=YearInMonth(month);
      |                              ~~~~~~~~~~~^~~~~~~
/in/foo.cc:25:13: note: candidate: 'int Date::YearInMonth()'
   25 |         int YearInMonth()
      |             ^~~~~~~~~~~
/in/foo.cc:25:13: note:   candidate expects 0 arguments, 1 provided

信息

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