Как здесь написано, я получаю сообщение «Встроенная функция SavingsAccount::DisplayValues не определена». У меня код работал, когда метод не был встроенным и был определен в файле SavingsAccount.cpp. Может ли кто-нибудь сказать мне, чего мне не хватает?
C1A8E1_SavingsAccount.h
Код: Выделить всё
#ifndef C1A8E1_SAVINGSACCOUNT_H
#define C1A8E1_SAVINGSACCOUNT_H
#include
#include
#include
using namespace std;
class SavingsAccount
{
public:
void GetInitialValues();
void DisplayValues() const;
double CalculatePenalty() const
{
return(closurePenaltyPercent_*.01*balance_);
}
private:
int type_;
string ownerName_;
long IDnbr_;
double balance_, closurePenaltyPercent_;
};
#endif
inline void SavingsAccount::DisplayValues() const
{
// display account type
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78502817/inline-function-savingsaccountdisplayvalues-is-not-defined-inline-const-cl[/url]