map,tuple用法

#include 
#include 
#include 
#include 
#include //算法
#include 
using namespace std;
void main(){	
   typedef tuple abd;
	abd abc[5];
	abc[0] = make_tuple(1, 2, "a", "b");
	typedef map mymap;
	map maps;
	maps.insert(pair(50, abc[0]));
	for (auto i : maps)
	cout << i.first << get<0>(i.second) << endl;
	vector vi;
	vi.push_back(1);
	vi.push_back(2);
	for (auto& n : vi)
		n++;//赋值
	for (auto n : vi)
		cout << n << endl;
}

 
  

你可能感兴趣的:(C++)