I need to initialize a static array. Not all of the values are sequential.
Something like this works fine for a sequential array:
class Foo { publ
I would suggest you to use std::map (or unordered_map if you have C++11 support) instead of the array. You can then insert into this map with the code : m[67] = "Sun" and retrieve items using std::string s = m[67];.
std::map
unordered_map
m[67] = "Sun"
std::string s = m[67];