cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
make a variable global across all .cpp
make a variable global across all .cpp
Oct 15, 2019 at 6:02am UTC
marhuum
(181)
How do we make a variable global across all .cpp files/modules of one (will-be) binary, which is to be compiled and linked by g++ in one line?
Oct 15, 2019 at 6:14am UTC
deleted account xyzzy
(5768)
extern
https://stackoverflow.com/questions/10422034/when-to-use-extern-in-c
Oct 15, 2019 at 3:05pm UTC
jonnin
(11437)
with a couple of extra lines you can make it a static class variable.
Topic archived. No new replies allowed.