C++typedef struct和struct的区别
时间:
2019-06-26 11:16:17
阅读:
106
评论:
收藏:
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