vendredi 5 juin 2015

Is there a way to have a std::map without declare the value type

I need a std::map container have something like:

[ "a" => [ "a1" => [ "a11" => 1, "a12" => 0 ], "a2" => 1 ] ]

  1. The key "a1" have a value of another std::map, but the key "a2" have a value of integer. In this situation, how can I declare the map?

  2. Is there a way to change the value to another type? For example, if I want to change the value of "a12" to a std::vector?

Thanks.

Aucun commentaire:

Enregistrer un commentaire