vector<map<string, string>> records; map<string, string> record; record.insert(pair<string, string>("key", "value")); records.push_back(record); for (auto &record : records) { cout << "************************* record " << i++ << " start *************************" << endl; for (auto &field : record) { cout << field.first << ": " << field.second << endl; } }