• Welcome to Religious Forums, a friendly forum to discuss all religions in a friendly surrounding.

    Your voice is missing! You will need to register to get access to the following site features:
    • Reply to discussions and create your own threads.
    • Our modern chat room. No add-ons or extensions required, just login and start chatting!
    • Access to private conversations with other members.

    We hope to see you as a part of our community soon!

Do we define data types by defining classes in that order?

Ostronomos

Well-Known Member
Also, I am curious to know why the compiler requires separate compilation for its programs and what is the need to write our own header files? Is it to avoid clashes between entities such as variables when defining them between multiple files?
 

icehorse

......unaffiliated...... anti-dogmatist
Premium Member
Also, I am curious to know why the compiler requires separate compilation for its programs and what is the need to write our own header files? Is it to avoid clashes between entities such as variables when defining them between multiple files?

I find a couple of details missing in the OP, but I think you're on the right track when you're thinking of name spaces.
 

icehorse

......unaffiliated...... anti-dogmatist
Premium Member
Is the preprocessor commonly used for separate compilation? I don't think it's related to namespaces.

As I hinted at before, I'd need more details about the language, language version, and compilers versions, and OS.
 

Ostronomos

Well-Known Member
As I hinted at before, I'd need more details about the language, language version, and compilers versions, and OS.
In c++ the preprocessor is useful for defining multiple header files, as unrelated to the separate compilation for variables. My question failed to distinguish between the two. Correct?
 

Ostronomos

Well-Known Member
Does the compiler give an error message if one fails to properly define and declare the variable in proper separate compilation format? I believe the preprocessor is used for safely dividing a class definition into multiple header files correct?
 
Top