猪猪虾 发表于 2021-2-22 10:51:12

结构体数组初始化问题


这么初始化有什么问题吗,报错显示people.name = "li"必须是可修改的左值
struct People
{
        char name;
        int cur;
}people = { people.name = "li",people.name = "zhang",people.name = "wang"};

wp231957 发表于 2021-2-22 11:15:41

c语言里,字符串赋值不能用等号
页: [1]
查看完整版本: 结构体数组初始化问题