社区
连云港职业技术学院
帖子详情
小单同学shan
2022-03-06 14:36:31
typedef和union
//typedef和union#include<stdio.h>typedef int zheng;//把中间的替换成最后的那个名字 union point{ int x; int y;}a;int main(){ zheng i=5; printf("%d",i); scanf("%d",&a.x ); scanf("%d",&a.y ); printf("%d",a.x );//union和struct不同的是 union共用一块空间 .
https://blog.csdn.net/m0_66252872/article/details/122589931
103
回复
打赏
收藏
typedef和union
//typedef和union#include<stdio.h>typedef int zheng;//把中间的替换成最后的那个名字 union point{ int x; int y;}a;int main(){ zheng i=5; printf("%d",i); scanf("%d",&a.x ); scanf("%d",&a.y ); printf("%d",a.x );//union和struct不同的是 union共用一块空间 .
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
连云港职业技术学院
30
社区成员
27
社区内容
发帖
与我相关
我的任务
连云港职业技术学院
复制链接
扫一扫
分享
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章