【菜鸟级】谁能告诉我这儿哪儿错了?关于结构体
程序代码:
#include<stdio.h> #include<conio.h> struct stu{ char name[20]; int age; char university[100]; } int main(){ struct stu swj={"wengjie",19,"UIC"}; struct stu *wj=&wengjie; printf("name: %s\n",stu.name); printf("age: %s\n",stu.age); printf("university: %s\n",stu.university); printf("name: %s\n",wj->name); printf("age: %s\n",wj->age); printf("university: %s\n",wj->university); getch(); return 0; }