问答详情
源自:4-2 定制自己的容器:结构体和共用体

结构体名字

结构体名字是这样命名吗?

struct student{

int math;

int english;

};

student就是名字,后面用的话不是应该student.math[]吗?

提问者:慕函数7131464 2022-11-13 15:43

个回答

  • 慕函数7131464
    2022-11-13 15:44:40

    int main(){

       struct Student stu[50];

       stu[20].math=50;

       stu[20].english=50;

       return 0;

    }


    里的 struct Student stu[50];是重新命名为stu了吗