指针可不可以用static
永夜星空 2005-08-13 12:35:36 我想要个静态的指针,于是在类的声明中加了如下一行:
static node * current; //node是个结构体
开始以为这就和 static node current;定义一个静态变量差不多,但是出错,这样提示
T1 error LNK2001: 无法解析的外部符号 "private: static class node * graph::current" (?current@graph@@0PAVnode@@A)
这是为什么?