我的结构如下:
struct Candidate {
float pertotal, voteper;
string name;
int voten, votem, votese, votesw, total;
};
我需要为名称分配一个空值。我努力了:
struct Candidate {
float pertotal, voteper;
string name = 0;
int voten, votem, votese, votesw, total;
};
和
struct Candidate {
float pertotal, voteper;
string name = "";
int voten, votem, votese, votesw, total;
};
但它似乎不喜欢它.. 想法?