error C2088: “[”: 对于 class 非法
class Controller//控制器存储账户列表和处理命令
{
private:
const static int MAX_ACCOUNTS=10;
Date date;
vector<Account*>accounts;//像容器一样存放各种类型的对象
bool end;
int num_accounts;
Account *accounts[MAX_ACCOUNTS];
public:
Controller(Date &date):date(date),end(false),num_accounts(0){}
~ Controller();
Date &getDate(){return date;}
bool isEnd(){return end;}
bool runCommand(string &cmdLine);//判断是否保存该命令
};
Controller::~Controller()//系统结束后手动删除分配的资源
{
for(int i=0;i<num_accounts;i++)
{
delete accounts[i];
}
}
ps: error C2088: “[”: 对于 class 非法(求解啊)