c++ map和vector嵌套混合使用

目录

增,查使用实例:

使用方法教程


增,查使用实例:

	map<int, std::vector<int>> size_dict;

	for (int j = 0; j < 2; j++) {

		vector<int> tmp_group;

		for (int i = 0; i < 5; i++) {
			tmp_group.push_back(5 * j + i);
		}

		for (int i = 0; i < 5; i++) {
			size_dict.insert(make_pair(5 * j + i, tmp_group));
		}
	}
	int user_name = 2;
	map<int, std::vector<

猜你喜欢

转载自blog.csdn.net/jacke121/article/details/126002512