| prw8864 (6) | |||
|
I am trying to make a wrapper class based on the map class. I need to use the object declared with the third typename parameter, "_Compare", in the base map class "map<key, value, compare>" I looked in the header for map and found "comp", but when I try to compile I get the message "error" comp was not declared in this scope. What is the name of the object I am trying to use?
The object declared with this typename has a member called set that I need to be able to chance during execution of code. | |||
|
|
|||
| ne555 (4042) | |
|
You are entering in implementation defined code. ¿Is this what you are talking about? http://cplusplus.com/reference/stl/map/value_comp/ It does not have a public set method... ¿What are you trying to do? ¿changing the comparison function in the middle of the game? Besides that it will break everything, it could be a hard hack, because the map could be creating temporaries in order to perform the comparison. | |
|
|
|
| prw8864 (6) | |||
|
>>¿Is this what you are talking about? http://cplusplus.com/reference/stl/map/value_comp/ maybe, how would I access this class within my wrapper class? /* * * What I am trying to do is the following: *
* * xmap is a wrapper class that will allow me to set up a method to access the set method in my compare class | |||
|
|
|||