I am writing a class as a wrapper around a std::map.
The class is:
template<class TKey, class TValue>
class CGeneralMap : protected map<TKey, TValue>
At the moment I have basic functions like Add, Remove etc but I am
really struggling with GetValue, which will be like the value obtained
from [key]
Eg if I create a:
CGeneralMap<int , std::stringTest Map;
and I have a key 3 with std::string value of John. then how in my
GetValue function do I extract the "John"?
In my GetValue function I tried:
value = [3];
but that doesn't work.
The class is:
template<class TKey, class TValue>
class CGeneralMap : protected map<TKey, TValue>
At the moment I have basic functions like Add, Remove etc but I am
really struggling with GetValue, which will be like the value obtained
from [key]
Eg if I create a:
CGeneralMap<int , std::stringTest Map;
and I have a key 3 with std::string value of John. then how in my
GetValue function do I extract the "John"?
In my GetValue function I tried:
value = [3];
but that doesn't work.
Comment