#include "stdafx.h" #include<iostream> #include<utility> #include<string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { pair<int, string>oPoint; //必须包含std oPoint.first = 1; oPoint.second = "one"; cout << oPoint.first << "|" << oPoint.second << endl; return 0; }
原文:http://www.cnblogs.com/zenseven/p/3805567.html