I'm having problems with this program and it seems to be in my header file can anyone guide me in the right direction?
Code:
//Header file for Checking Account Program
//CheckAccount.h
class CheckAccount
{
Public:
CheckAccount (int date, string name, float balance);
void withdraw ()float;
void deposit ()float;
float CurrentBalance ();
Private:
AccountopenDate (y,m,d); //Considering a struct
AccountOwner(string name);
CurrentBalance(float balance);
};
Code:
//Implement
//CheckAccount.cpp
#include <iostream>
#include "CheckAccount.h"
using namespace std;
CheckAccount::CheckAccount(int date, string name, float balance)
{
AccountOpenDate = date;
struct AccountOpenDate
{
int year;
int month;
int day;
};
AccountOwner = name;
CurrentBalance = balance;
}
void CheckAccount::withdraw(float)
{
cout<<"Cash Amount Wanted: "<<endl;
cin>>w;
}
void CheckAccount::deposit(float)
{
cout<<"Amount Deposited: "<<endl;
cin>>d;
}
float ChechAccount::CurrentBalance(float)
{
Switch balance
{
case d:
CurrentBalance=balance+Deposit;
cout<<CurrentBalance;
break;
case w:
CurrentBalance=balance-Withdraw;
cout<<CurrentBalance;
break;
default:
cout<<"Error made"<<endl;
break;
};
}
Thank You.