记录详情

Compile Error

/in/foo.cc: In copy constructor 'Package::Package(const Package&)':
/in/foo.cc:42:79: error: no matching function for call to 'Package::Package(const Person&, const Person&, const double&, const double&)'
 Package::Package(const Package& p) :Package(p.send, p.recive, p.weight, p.cost)
                                                                               ^
/in/foo.cc:37:5: note: candidate: Package::Package(const Package&)
     Package(const Package& );
     ^~~~~~~
/in/foo.cc:37:5: note:   candidate expects 1 argument, 4 provided
/in/foo.cc: In function 'int main()':
/in/foo.cc:84:12: error: no matching function for call to 'Person::Person()'
     Person sender;
            ^~~~~~
/in/foo.cc:21:1: note: candidate: Person::Person(const Person&)
 Person::Person(const Person& p)
 ^~~~~~
/in/foo.cc:21:1: note:   candidate expects 1 argument, 0 provided
/in/foo.cc:88:12: error: no matching function for call to 'Person::Person()'
     Person recipient;
            ^~~~~~~~~
/in/foo.cc:21:1: note: candidate: Person::Person(const Person&)
 Person::Person(const Person& p)
 ^~~~~~
/in/foo.cc:21:1: note:   candidate expects 1 argument, 0 provided
/in/foo.cc:97:47: error: no matching function for call to 'Package::Package(Person&, Person&, double&, double&)'
     Package p(sender, recipient, weight, price);
                                               ^
/in/foo.cc:42:1: note: candidate: Package::Package(const Package&)
 Package::Package(const Package& p) :Package(p.send, p.recive, p.weight, p.cost)
 ^~~~~~~
/in/foo.cc:42:1: note:   candidate expects 1 argument, 4 provided

信息

递交者
类型
递交
题目
P1005 11.9 Package_Inheritance
语言
C++
递交时间
2020-03-24 22:48:56
评测时间
2020-03-24 22:49:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes