c++ structure, which is defined and used similarly to c++ classes
struct node{
node (){} // 结构体的无参构造方法
node(string ss, int tt){s = ss,t =tt;} // 结构体的有参数构造方法
string s; // 结构体的字符串型成员变量
int t; // 结构体的整形成员变量
};
- When used, we can initialize the struct variable
struct node myNode("name", 10); // 定义node结构体 myNode,并初始化它的成员信息