我想用std::map对象中包含的键初始化std::vector对象.
std::map
std::vector
std::vector<char> mykeys { 'a', 'b', 'c' ]; std::map<char, int> myMap;
如果没有循环,我怎么能这样做?
我可以为我添加默认值int吗?
int
c++ stl c++11
c++ ×1
c++11 ×1
stl ×1