![]() |
|
#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:
__________________
During the election they said Obama could only be elected when pigs fly. Well, we currently have an epidemic of Swine Flu. Coincidence? |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| 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 16:41 |
| Including Maps and strings?? | maddie | C++ Forum | 17 | 05-Jul-2004 07:25 |
| some I/O problems...again | cameron | C++ Forum | 3 | 03-Mar-2004 22:39 |
| Need help adding a footer | demtro | MySQL / PHP Forum | 2 | 10-Feb-2004 20:48 |
| Cross Site Scripting Vulnerabilities - XSS | JdS | Web Design Forum | 0 | 27-Nov-2002 07:08 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The