Question
main.cpp:23:1: error: a function-definition is not allowed herebefore { token { ^ main.cpp:36:1: error: expected class-name before { token { ^ main.cpp:44:2: error: expected ;
main.cpp:23:1: error: a function-definition is not allowed herebefore ‘{’ token
{
^
main.cpp:36:1: error: expected class-name before ‘{’ token
{
^
main.cpp:44:2: error: expected ‘;’ after class definition
}
^
;
main.cpp:47:1: error: a function-definition is not allowed herebefore ‘{’ token
{
^
main.cpp:56:1: error: a function-definition is not allowed herebefore ‘{’ token
{
^
main.cpp:65:1: error: a function-definition is not allowed herebefore ‘{’ token
{
^
main.cpp:74:1: error: a function-definition is not allowed herebefore ‘{’ token
{
^
main.cpp:83:1: error: a function-definition is not allowed herebefore ‘{’ token
{
^
main.cpp:92:1: error: a function-definition is not allowed herebefore ‘{’ token
{
^
main.cpp:103:1: error: a function-definition is not allowed herebefore ‘{’ token
{
^
main.cpp:115:1: error: expected ‘}’ at end of input
}
error on this code
#include "bankAccount.h"
#include "checkingAccount.h"
int main()
{
checkingAccount Customer1;
Customer1.setAccountNum(100584220);
Customer1.setBalance(2500);
Customer1.setServiceCharges(15);
Customer1.setminBalance(350);
Customer1.setInterest(5);
double virtual wdrawAmnt(double wAmnt)
{
Balance = Balance - wAmnt;
return(Balance);
}
;
class CheckingAccount : BankAccount
{
double Intrst;
double minBal;
double serChge;
}
double retIntRate()
{
return(Intrst);
}
void setMinBal(double mBal)
{
minBal = mBal;
}
double retMinBal()
{
return(minBal);
}
void setSerChge(double sCharge)
{
serChge = sCharge;
}
double retSerChge()
{
return(serChge);
}
double depAmnt(double dAmnt)
{
Balance = Balance + dAmnt;
return(Balance);
}
double wdrawAmnt(double wAmnt)
{
if(wAmnt <= Balance)
Balance = Balance - wAmnt;
else
cout << "You have insufficient funds!" << endl;
return(Balance);
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started