#include<bits/stdc++.h> using namespace std; int main(){ //定义 pair //4、为 pair<int,string>类型起别名 typedef pair<int,string> Stu; Stu s1(1000,"Zhang"); Stu p; p.first = 1002; p.second ="Wang"; cout<<p.first<<" "<<p.second<<endl; return 0; }