0
点赞
收藏
分享

微信扫一扫

Typedef的用法

三次方 2022-01-06 阅读 85
c语言

typedef的用法

#include<stdio.h>

typedef struct student
{
	int a;
	char name[100];
	char sex;
}*PST, ST;      //  PST代表struct student *   ST代表struct student
int main(void)
{
//	struct student sy;
//	struct student* pst = &sy;

	ST st;
	PST ps = &st;
	ps->a = 99;
	printf("a = %d\n\r",ps->a);

	return 0;
}

在这里插入图片描述

举报

相关推荐

0 条评论