Dear all,
I have found a turnaround solution to the problem of creating a static const map for those who want to make large lookup tables.
Form a class and make the map an instance member of that class. Fill the map in the class' constructor.
After that, make an static instance of that class.
In this way the data is filled only once. And you may define a method to return a value from the map.
I have found a turnaround solution to the problem of creating a static const map for those who want to make large lookup tables.
Form a class and make the map an instance member of that class. Fill the map in the class' constructor.
After that, make an static instance of that class.
In this way the data is filled only once. And you may define a method to return a value from the map.
Comment