首页 > 编程语言 > 详细

C++typedef struct和struct的区别

时间:2019-06-26 11:16:17      阅读:106      评论:0      收藏:0      [点我收藏+]
#include "pch.h" #include struct struct1 { int a; char b; char* c; }test1;//定义结构体变量 typedef struct struct2 { int a; char b; char* c; }test2;//定义结构体类型 int main() { test1.a = 10; test2 *t2=new test2(); t2->a = 20; }

C++typedef struct和struct的区别

原文:https://www.cnblogs.com/tsh292278/p/11088582.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!