#### Archived

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

# Includes

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

## 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 on other sites
Why not just include it?

##### Share on other sites
Yeah, that really does not make sense.

Could you explain a little more?

##### Share on other sites
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 on other sites

  #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 on other sites
If you get linking errors, it probably means you defined variables in the header, which is almost always the wrong thing to do. See the last link in my signature below if you want to find out why this is so.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]

• 15
• 9
• 13
• 41
• 15