![]() |
|
#1
|
||||
|
||||
Cross includehi all,i have some problem and i`m not sure about the source
i have 2 classes CPP / C++ / C Code:
CPP / C++ / C Code:
thnx in advance |
|
#2
|
||||
|
||||
|
Hi BlueTeeth.
I found a little trick that is implemented in all of the standard libraries. You need to include these files, but you don't want to include them if they are already included. So at the very top of includes, I always put: CPP / C++ / C Code:
And at the end put: CPP / C++ / C Code:
Your __HEADER_NAME is a unique name based on your file, I ussually use things like __CROSS_H. This way, the include file will be gone through only once, even if it is included by several files. HTH d |
|
#3
|
||||
|
||||
|
Quote:
i mean for example when compiling cell.cpp the compiler will need "slot.h" while the slot.h contains some "cell" members!!what`s the solution |
|
#4
|
||||
|
||||
|
Quote:
Quote:
Quote:
__________________
Age is unimportant -- except in cheese |
Recent GIDBlog
Meeting the local Iraqis by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] GUI programming with FLTK | dsmith | FLTK Forum | 10 | 03-Oct-2005 15:41 |
| Including Maps and strings?? | maddie | C++ Forum | 17 | 05-Jul-2004 06:25 |
| some I/O problems...again | cameron | C++ Forum | 3 | 03-Mar-2004 21:39 |
| Need help adding a footer | demtro | MySQL / PHP Forum | 2 | 10-Feb-2004 19:48 |
| Cross Site Scripting Vulnerabilities - XSS | JdS | Web Design Forum | 0 | 27-Nov-2002 06:08 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The