- 在c语言中
struct Teacher { int age; char name[24] ; }Teacher;
定义变量的时候应该为:
-
struct Teacher t1;
- 但是如果
-
typedef struct Teacher { int age; char name[24] ; }Teacher;
则定义的时候 直接为:
Teacher t1;
时间: 2024-10-05 04:45:16
struct Teacher { int age; char name[24] ; }Teacher;
定义变量的时候应该为:
struct Teacher t1;
typedef struct Teacher { int age; char name[24] ; }Teacher;
则定义的时候 直接为:
Teacher t1;