#include<iostream>
#include<utility>
#include<string>
using namespace std;
int main()
{
pair<string,int>p;//字符串处理必须用string
p.first="haha";
p.second=5;
cout<<p.first<<" "<<p.second<<endl;
p=pair<string,int>("xixi",55);
cout<<p.first<<" "<<p.second<<endl;
p=make_pair("heihei",555);
cout<<p.first<<" "<<p.second<<endl;
return 0;
}
pair的访问
猜你喜欢
转载自blog.csdn.net/weixin_45884316/article/details/104160306
今日推荐
周排行