4
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by jwenting
0

Care to elaborate what you are trying to convey here by posting your code or with an example....

Or is it that you have declared all the global data or variables in one file and want your progams to access those ?

0

globals are evil. They reek of design errors.

But if you insist on using them, put them in a header file you #include in everything.

0

globals are evil. They reek of design errors.

But if you insist on using them, put them in a header file you #include in everything.

And in so doing create multiple definition errors for each variable. Instead, put the extern declarations in the header file and leave the globals defined in one source file.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.