i try to use std::map as property in my class. I use Visual Studio 2012, and my class is like:
public ref class MyClass
{
std::map<std::wstring,MyType> * mpMyMap;
MyClass()
{
mpMyMap = new std::map<std::wstring,MyType>();
}
~MyClass()
{
delete mpMyMap;
}
Get(std::wstring name)
{
return mpMyMap[name];
}
}
At return mpMyMap[name]; I get error, what there is no operator[] for this type. What should I do?