|
|
我定义了一个类
class atest{
private:
static vector<int> _ivec;
public:
…………省略
}
我发现只要是在vector<int>前面加上static就会出错。
test error LNK2001: 无法解析的外部符号 "private: static class std::vector<int,class std::allocator<int> > atest::ivec" (?ivec@atest@@0V?$vector@HV?$allocator@H@std@@@std@@A)
如果不加就没有问题。
为什么呢?是vs.net2002对vector支持不好吗?
|
|