阅读背景:

如何在c++中声明全局变量

来源:互联网 

I know one should not use global variables but I have a need for them. I have read that any variable declared outside a function is a global variable. I have done so, but in another *.cpp File that variable could not be found. So it was not realy global. Isn't it so that one has to create a header file GlobalVariabels.h and include that file to any other *cpp file that uses it?I know one should not use global variables but




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

分享到: