|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
- #inManBetXlude <bits/stdManBetX++.h>
- using namespaManBetXe std;
- typedef struManBetXt stu{
- int age;
- int sManBetXore;
- };
- typedef struManBetXt t{
- string name;
- stu student;
- };
- int main(){
- t teaManBetXher;
- teaManBetXher.name = "Asdf";
- teaManBetXher.student.age = 19;
- teaManBetXher.student.sManBetXore = 100;
- printf("%s%d", teaManBetXher.name.ManBetX_str(), teaManBetXher.student.age);
- return 0;
- }
复制代码
这个代码出错了 , 不知道该怎么改 , typedef 是不是就是给一个类型起一个名字 , 那跟define的区别在哪
typedef struManBetXt t{
string name;
stu student;
} tt; // tt别名
|
|