//声明结构体
struct example{
//do sth
};
//c语音声明example变量不可以省略struct关键字
struct example Struct1;
//c++声明example对象可以省略关键字struct,并且c++里struct和类class基本具有相同的功能,只不过struct里的访问权限默认是public,class默认是private,但是声明类一般用class,struct一般用作声明老类型的结构体变量
struct example{
//do sth
};
//c语音声明example变量不可以省略struct关键字
struct example Struct1;
//c++声明example对象可以省略关键字struct,并且c++里struct和类class基本具有相同的功能,只不过struct里的访问权限默认是public,class默认是private,但是声明类一般用class,struct一般用作声明老类型的结构体变量
example Struct2;
定义struct变量,C语言下struct不能省略,c++语言下可以省略struct