+ 1
Headers
why does included headers in c++ has functionally.. while headers are meant to be for definition only .. and no implementation! ?
6 Réponses
+ 3
headers are meant to declare functions or variable... their implementation is to be done in cpp files... once you need to use those function in other unit, you need to include headers in other unit... this header inclusion will allow you to use those functions declared in header nd defined in cpp..
+ 2
include means simply copy paste of data from one unit to another unit.. this is precompile task... as "include" is a preprocessor... precompile does inclusion, removal of code comments and macro definition inclusion before actual compilation by compiler..
using means allowing from one unit to other unit without direct copy paste... this inclusion is handled by compiler, not preprocessor...
+ 1
When you define a header, you have access to every available function and usable feature of the module.
Defining a header defines access to the contents within it.
0
OooK .. what is the difference between include and using in c++ then ? thanx
0
last question .. is there a preprocessor language or some source to learn it .. how did u learn it ? it's not included in c++ .. thanx alot