‘createCard’ is a private member of ‘CardFactory’
在方法中,要增加public:
class CardFactory{
public:
virtual ICard* createCard(int backId,int number);
};
默认在c++中在.h的方法里面书写的是private,如果定义的是public,需要在作用域前面把public写出来。
‘createCard’ is a private member of ‘CardFactory’
在方法中,要增加public:
class CardFactory{
public:
virtual ICard* createCard(int backId,int number);
};
默认在c++中在.h的方法里面书写的是private,如果定义的是public,需要在作用域前面把public写出来。