阅读背景:

为什么非静态变量不能驻留在头文件中?

来源:互联网 

Take for example:

举个例子:

// myheader.h
static int myStaticVar = 0;
// If we remove 'static' the compiler will throw linker error.

void DoStuff();

// and myheader.cpp, and main.cpp;  etc
// myheader.h
stati



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: