//SavingAccount.cpp
#include <iostream>
using std::cout;
using std::endl;
using std::cin;
#include "SavingAccount.h"
int SavingAccount::annualInterestRate = 3;//static 멤버 변수 초기화
SavingAccount::SavingAccount(double b)
{
b = savingBalance;
}
SavingAccount::~SavingAccount()
{}
double SavingAccount::calculatemonthlyinterest()
{
double m;
m = savingBalance*(annualInterestRate / 100) / 12;
return m;
}
double SavingAccount::getsavingBalance()
{
return savingBalance;
}
void SavingAccount::modifyInterestRate()
{
cin >> annualInterestRate;
}
//main.cpp
#include <iostream>
using std::cout;
using std::endl;
#include "SavingAccount.h"
void main()
{
SavingAccount saver1(2000.00), saver2(3000.00);
cout << "class SavingAccount test program" << endl;
saver1.calculatemonthlyinterest();
saver2.calculatemonthlyinterest();
cout << "월 이자" << saver1.calculatemonthlyinterest() << endl;
cout << "월 이자" << saver2.calculatemonthlyinterest() << endl;
}
어디가 잘못된건지
main함수에
saver1.calculatemonthlyinterest();
saver2.calculatemonthlyinterest();
이부분이 안돼요 ㅠㅠㅠㅠ