黑马228
#include
#include
#include
using namespace std;
void test01()
{
//第一种方式创建
pair<string, int>p(“tom”, 20);
cout << “name:” << p.first << " age:" << p.second << endl;
//第二种方式创建队组
pair<string, int>p2 = make_pair("jane", 30);
cout << "name:" << p2.first << " age" << p2.second << endl;
}
int main()
{
test01();
}