您当前的位置: 首页 > 

结构成员访问的三种方法

发布时间:2004-10-25 10:49:00 ,浏览量:0

结构成员访问的三种方法

#include "stdio.h"
#include "string.h"
#include 


main ()
{
struct student{
int num;
char * name;
int score;
}stu;

struct student *p=&stu;
stu.num=1;
(*p).name="tom";
p->score=78;
printf("%d\n",p->num);
printf("%s\n",p->name);
printf("%d\n",p->score);
}

关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    108697博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.2279s