|
|||||||
| General Programming Forum devoted to general, non-Qt programming issues. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi
Is there any use of header file apart from prevention recompilation and hiding the implementation. |
|
#2
|
|||
|
|||
|
Your header files are not for preventing recompilation (especially since modifying a header requires all including compilation units to be recompiled), nor do they hide things - it's all the contrary, actually. They expose the interface of other compilation units or libraries so that the compiler knows what symbols are available.
Say you want to use printf. Unless it is declared in a header file, the compiler has no way to know what arguments it takes or what it returns. Same thing for global variables. This is what header files are mainly for. http://en.wikipedia.org/wiki/Header_file |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Set up the Qt4.3.2 with Visual Studio 2005 | lamoda | Installation and Deployment | 6 | 30th January 2008 07:51 |
| AVOIDING mutiple inclusion of header file??? | pratik | General Programming | 4 | 10th July 2007 15:09 |
| qt-3.3.8 fail in scratchbox | nass | Installation and Deployment | 0 | 25th May 2007 16:21 |
| Related to header file | merry | Qt Programming | 2 | 10th May 2007 14:03 |
| qt3 to qt4 - uic issue | hvengel | Qt Programming | 10 | 4th March 2007 03:59 |