![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Dec 2004
Posts: 50
Rep Power: 4
![]() |
Including header files
How to prevent header files from being included twice?
My code is messed up and I need to include lots of .h files in other files so I get errors from the linker that X is already defined in x.obj file. I tried using inclusion guards like this: #ifndef INC_HEADER1 #define INC_HEADER1 <file content goes here> #endif and also tried #pragma once but i still get the same errors But even if i include e.g windows.h or string.h a hundred times i never get linker errors about them. help? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|