#include <iostream>
#include <vector>
#include <map>
#include <string>
int main ()
{
std::map<std::string, std::vector<float> > m_data;
std::vector<float> m_mass{1.0,3.0,5.0,7.0};
std::vector<float> m_velocity{1.0,3.0,5.0,7.0};
std::vector<unsigned int> m_charge{2,4,6,8};
m_data.insert(std::make_pair("mass", m_mass) );
m_data.insert(std::make_pair("velocity",m_velocity) );
m_data.insert(std::make_pair("charge", std::vector<float>(
m_charge.begin(), m_charge.end())) );
for(const auto p: m_data) {
std::cout << p.first << ": ";
for(const auto& n: p.second)
std::cout << n << ' ';
std::cout << '\n';
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8bWFwPgojaW5jbHVkZSA8c3RyaW5nPgoKaW50IG1haW4gKCkKewoKCXN0ZDo6bWFwPHN0ZDo6c3RyaW5nLCBzdGQ6OnZlY3RvcjxmbG9hdD4gPiBtX2RhdGE7CglzdGQ6OnZlY3RvcjxmbG9hdD4gICAgICAgIG1fbWFzc3sxLjAsMy4wLDUuMCw3LjB9OwoJc3RkOjp2ZWN0b3I8ZmxvYXQ+ICAgICAgICBtX3ZlbG9jaXR5ezEuMCwzLjAsNS4wLDcuMH07CglzdGQ6OnZlY3Rvcjx1bnNpZ25lZCBpbnQ+IG1fY2hhcmdlezIsNCw2LDh9OwoJbV9kYXRhLmluc2VydChzdGQ6Om1ha2VfcGFpcigibWFzcyIsICAgIG1fbWFzcykgKTsKCW1fZGF0YS5pbnNlcnQoc3RkOjptYWtlX3BhaXIoInZlbG9jaXR5IixtX3ZlbG9jaXR5KSApOwoJbV9kYXRhLmluc2VydChzdGQ6Om1ha2VfcGFpcigiY2hhcmdlIiwgIHN0ZDo6dmVjdG9yPGZsb2F0PigKCQkJCQkJCQkJCQkJbV9jaGFyZ2UuYmVnaW4oKSwgbV9jaGFyZ2UuZW5kKCkpKSApOwoJZm9yKGNvbnN0IGF1dG8gcDogbV9kYXRhKSB7CgkJc3RkOjpjb3V0IDw8IHAuZmlyc3QgPDwgIjogIjsKCQlmb3IoY29uc3QgYXV0byYgbjogcC5zZWNvbmQpCgkJCXN0ZDo6Y291dCA8PCBuIDw8ICcgJzsKCQlzdGQ6OmNvdXQgPDwgJ1xuJzsKCX0KfQo=