#include #include using namespace std; struct Person { string name; int count; };
int main() { Person leader[3]={{"li",0},{"zhang",0},{"fun",0}};
error C2440: 'initializing' : cannot convert from 'char [3]' to 'struct Person'
收起
这个需要c++11才能支持,你的编译器是什么?
报告相同问题?