【发布时间】:2012-04-17 07:41:13
【问题描述】:
我有一个私有成员是静态映射的类:
Class Devices
{
...
private:
struct DevicePair
{
int nCtr;
bool isToAdd;
};
DevicePair m_DevPair;
static map <string, DevicePair> m_SYSdeviceMap;
};
为什么我不能在 cpp 文件中执行此操作?
map <string, DevicePair> Devices::m_SYSdeviceMap;
如何在 cpp 文件中初始化它?
【问题讨论】:
标签: c++ data-structures map static