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