c++ - 无论如何有一个多维 map ?

标签 c++ dictionary

我正在寻找一种在 C++ 中创建多维 map 的方法。它会是这样的:

["Key1"]
         ["SubKey1"] = "Value"
         ["SubKey2"] = "Value"
["Key2"]
         ...

最佳答案

你可以使用一个

std::map<std::string, std::map<std::string, std::string>>

关于c++ - 无论如何有一个多维 map ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26117693/

相关文章:

c++ - operator= 在两个 std::chrono::time_point 之间导致错误

c++ - 如何对 vector 进行二进制搜索以查找具有特定 id 的元素?

python - 将 pandas 中的字典拆分为单独的列

Java对象: Dynamic type not visible

python - 字典中的总和值小于某个值

python - 如何从列表和字典中生成输出并将它们的结果输出与字典值匹配?

c++ - 使用命令行参数创建结构 vector

C++:组织程序子系统的正确方法是什么?

C# 字典 ContainsKey 与 Keys.Any()

C++ 设置 "blank"或重置 ifstrean (ios) 的异常掩码