我有一個類如何初始化類類型的載體在構造函數中
class effeid
{
public:
effeid(int a=0,int b=0,int c=0,int d=0):first(a),second(b),third(c),fourh(d){};
int first;
int second;
int third;
int fourh;
};
,然後第二類
class AxeEffect {
public:
//and I want to initialize the constructor in that way:
AxeEffect(int=0,string="",int=0,int=0,int=0,int=0,vector<effeid>???);
如何初始化向量爲0的一部分嗎?
刪除了我的最後一條評論,我誤解了。所以你想讓'AxeEffect'的構造函數以std :: vector爲參數?如果是這樣,你的意思是0? – Ryan 2013-05-02 20:42:01
'vector to 0'是什麼意思?零矢量(int),還是空矢量? – xbonez 2013-05-02 20:42:46
是否以任何方式與此問題相關的第一類? – typ1232 2013-05-02 20:43:58