Labels

16/07/2009

Globle variabal definition

(全局变量定义)

Assume I have a.cpp b.cpp c.cpp and I need use integer i in all three of them.

I declare extern int i in globvar.h file;

Define int i in globevar.cpp file;

#include globvar.h file in all three .cpp files.

No comments:

Post a Comment