请问这个程序一直没有调试成功,问题是出在哪里啊??谢谢!
#include <stdio.h>void main()
{
struct student
{
int num;
int age;
char name;
}stu;//定义一个结构体数组
stu = {{123,25,"Tom"},{321,52,"Bob"}};
struct student *pstu1,*pstu2;
pstu1 = &stu;
pstu2 = &stu;
printf("Num=%d,Age=%d,Name=%f\n",stu.num,stu.age,stu.name);
printf("Num=%d,Age=%d,Name=%f\n",(*pstu1).num,(*pstu1).age,(*pstu1).name);
} struct student
{
int num;
int age;
char name;
}stu = {{123,25,"Tom"},{321,52,"Bob"}};;//定义一个结构体数组
或者
struct student
{
int num;
int age;
char name;
};
struct stunde stu = {{123,25,"Tom"},{321,52,"Bob"}};//定义一个结构体数组 18084041536 发表于 2019-11-5 16:59
struct student
{
int num;
谢谢!
页:
[1]