c++程序设计 请哪位高手看看我这个类哪里写错啦,编译时总是出现 error C2629: unexpected 'class Account 5
小弟在此等候大侠的解决啊,程序源代码如下#include<iostream>usingnamespacestd;classAccount{private:std::str...
小弟在此等候大侠的解决啊,程序源代码如下
#include<iostream>
using namespace std;
class Account
{
private:
std::string id;
double balance;
static double total;
protected:
Account(const Data &date,const std::string &id);
void record(const Date &date,double amount,const std::string &desc);
void error(const std::string &msg) const;
public:
const std::string &getid() const
{
return id;
}
double getbalance() const
{
return balance;
}
static double gettoal()
{
return total;
}
void show() const;
};
在此先谢谢啦 展开
#include<iostream>
using namespace std;
class Account
{
private:
std::string id;
double balance;
static double total;
protected:
Account(const Data &date,const std::string &id);
void record(const Date &date,double amount,const std::string &desc);
void error(const std::string &msg) const;
public:
const std::string &getid() const
{
return id;
}
double getbalance() const
{
return balance;
}
static double gettoal()
{
return total;
}
void show() const;
};
在此先谢谢啦 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询