I'm new to object oriented Programming.Here I want to check the available amount is greater than amount that purchasing and return true or false.Can anyone show the errors and correct those implementations .Thanks!
foo.cpp:48:12: error: return type of out-of-line definition of 'Card::Purchase' differs from that in the declaration
bool Card::Purchase(double amount)
foo.cpp:16:10: note: previous declaration is here
double Purchase(double amount);
foo.cpp:50:5: error: use of undeclared identifier 'am_av'if(am_av>amount)
foo.cpp:61:30: error: use of undeclared identifier 'am_av'
cout<<"Available Amount: "<<am_av<<endl;