qq_22650919
2015-06-17 01:10
采纳率: 100%
浏览 1.9k

C++关于结构体初始化的问题

#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'

5条回答 默认 最新

相关推荐 更多相似问题