Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

hello_there

Includes

This topic is 5923 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

is there any way to make a file that any file can use and not have to include it? that makes no sence i know but someone might anderstand if so please help!!!

Share this post


Link to post
Share on other sites
Advertisement
i mean a file that you say include in the main file but every other file can use it even if they don''t include the main function. i want to include it twice but you get linking errors.

Share this post


Link to post
Share on other sites
Use ifndef define and endif in your headers, like this:

  
#ifdnef SOMETHING_HERE
#define SOMETHING_HERE

// Here goes all your header-contents


#endif


-Neophyte

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GED d- s:+ a- C++$ UL++ P++ L++ E W+ N+ o K? w !O M--(+) V-- PS+
PE Y+ PGP t-- 5++ X+ R(+) rv+(++) b+++ DI+ D(+) G e+>++ h r--> y+
----- END GEEK CODE BLOCK-----
geekcode.com

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!