L
Lee Crabtree
I'm trying to fill a map (the STL associative array) with a set of values.
In the normal nomenclature, I could initialize an array something like this:
int array = {1, 2, 3, 4};
Is there anyway to initialize a map in a mildly similar way? I (naively,
apparently) assumed that I'd be able to do something along the lines of:
std::map<char, int> mapz0r = {('b', 1) ('a', 5)};
That is evidently RIGHT OUT. Does anyone know of a way to do something like
this?
Lee Crabtree
In the normal nomenclature, I could initialize an array something like this:
int array = {1, 2, 3, 4};
Is there anyway to initialize a map in a mildly similar way? I (naively,
apparently) assumed that I'd be able to do something along the lines of:
std::map<char, int> mapz0r = {('b', 1) ('a', 5)};
That is evidently RIGHT OUT. Does anyone know of a way to do something like
this?
Lee Crabtree