c++ new map的问题
//.h
typedef struct KKControlInfoBox
{
std::string plate_number;
std::string control_range;
std::string precision;
}KKControlInfoBox;
typedef std::map<std::string, KKControlInfoBox> KKControlInfoBoxMap;
//.cpp
KKControlInfoBoxMap controlInfoTemp;
KKControlInfoBoxMap::const_iterator p;
STRING result = "";
int count = 0;
{
CLocker lock(&_controlInfoMutex);
controlInfoTemp (局部变量)= _controlInfo(全局变量);
}
现在是要申请一个新的内存空间来存放局部变量,局部变量声明了是容器map,现在要申请一个新的容器存放这局部controlInfoTemp ,应该怎么样申请?