记录详情

Compile Error

/in/foo.cc: In member function 'int Date::difference(Date&)':
/in/foo.cc:34:38: error: 'y' was not declared in this scope
   34 |                         num+=YearDay(y);
      |                                      ^
/in/foo.cc:36:31: error: no matching function for call to 'Date::YearDay()'
   36 |                 num+=d.YearDay()-d.pass();
      |                      ~~~~~~~~~^~
/in/foo.cc:21:13: note: candidate: 'int Date::YearDay(int)'
   21 |         int YearDay(int y){
      |             ^~~~~~~
/in/foo.cc:21:13: note:   candidate expects 1 argument, 0 provided
/in/foo.cc:36:40: error: no matching function for call to 'Date::pass()'
   36 |                 num+=d.YearDay()-d.pass();
      |                                  ~~~~~~^~
/in/foo.cc:24:13: note: candidate: 'int Date::pass(int, int, int)'
   24 |         int pass(int y,int m,int d){
      |             ^~~~
/in/foo.cc:24:13: note:   candidate expects 3 arguments, 0 provided

信息

递交者
类型
自测
题目
P1005 OO1-4 日期类Date
语言
C++
递交时间
3 周前
评测时间
3 周前
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes