Hello everyone!
I'm new to c++ programming and need help compiling one of my programs.
I get the following error messages but I don't know how to fix them:
In constructor 'XNoAccountDefect::XNoAccountDefect(AccountNumber)':|
13|error: no matching function for call to 'XBankingDefect::XBankingDefect()'|
13|note: candidates are:|
06|note: XBankingDefect::XBankingDefect(AccountNumber, std::string)|
06|note: candidate expects 2 arguments, 0 provided|
01|note: XBankingDefect::XBankingDefect(const XBankingDefect&)|
01|note: candidate expects 1 argument, 0 provided|
In constructor 'XNoMoneyDefect::XNoMoneyDefect(AccountNumber)':|
21|error: no matching function for call to 'XBankingDefect::XBankingDefect()'|
21|note: candidates are:|
06|note: XBankingDefect::XBankingDefect(AccountNumber, std::string)|
06|note: candidate expects 2 arguments, 0 provided|
01|note: XBankingDefect::XBankingDefect(const XBankingDefect&)|
01|note: candidate expects 1 argument, 0 provided|
In member function 'Euro Bank::takeMoney(AccountNumber, Euro)':|
88|warning: control reaches end of non-void function [-Wreturn-type]|
I would be more than thankful for any help you can provide!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
class XBankingDefect{
public:
string message;
AccountNumber account;
XBankingDefect(AccountNumber n, string m){message=m;
account=n;}
virtual ~XBankingDefect();
};
class XNoAccountDefect : public XBankingDefect{
public:
XNoAccountDefect(AccountNumber n){message="Error: There is no account '";
account=n;}
~XNoAccountDefect();
};
class XNoMoneyDefect : public XBankingDefect{
public:
XNoMoneyDefect(AccountNumber n){ message="Error: There is not enough money on account '";
account=n;}
~XNoMoneyDefect();
};
|