|
-
May 29th, 2009, 10:02 AM
#8
Re: how to implement c++ table lookup?
 Originally Posted by Speedo
The cleanest option from a usage POV is probably going to be to make a little wrapper class around your map that lets you access it with operator(). You could then use the singleton pattern to prevent the map from being duplicated, and simply use the constructor of the wrapper class to initialize the map.
I like this idea. Would it be possible to get [][] to work somehow?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|