🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Can I define Globals like this?

Started by
0 comments, last by Esap1 24 years, 5 months ago
Can I define all my globals in one file, because different header files, and cpp files, need the global variables, so I thought I should do it like that, I am doing it with my defines and it worked, so.......
Advertisement
If you want to, you can. You just need to declare them as extern in your header file. Then, be sure to include this header file before you other header files in your source files.

Edited by - I-Shaolin on 1/29/00 8:45:27 PM

This topic is closed to new replies.

Advertisement