65,186
社区成员




#ifndef _MAP_TEST_H
#define _MAP_TEST_H
#include <map>
#include <string>
using std::map;
using std::string;
map<string, string> map_config;
void init_map_config();
#endif
#include "map_test.h"
void init_map_config()
{
map_config.insert({"123", "123"});
map_config.insert({"456", "456"});
map_config.insert({"789", "789"});
}
#include <iostream>
#include "map_test.h"
using std::cout;
using std::endl;
int main()
{
init_map_config();
for (auto it = map_config.begin(); it != map_config.end(); it++)
cout << it->first << " " << it->second << endl;
cout << endl;
}