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
Obataining variable from other source
Obataining variable from other source
Apr 14, 2008 at 2:22pm UTC
moonshadow9988
(9)
I have 3 c++ sources in my project, and am wondering how to obtain a globally declared array from another c++ file.
Apr 14, 2008 at 2:54pm UTC
closed account (
z05DSL3A
)
Read up on the extern keyword.
This extern keyword is used to specify that the variable is declared in a different file. This is mostly used to declare variables of global scope in C++ projects.
Topic archived. No new replies allowed.