Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Noob Q: Headers in C++

Options
  • 23-01-2006 3:42pm
    #1
    Registered Users Posts: 847 ✭✭✭


    I'm new to C++ programming, i've done VB.Net, VBA and Javascript before so I wanna expand my alphabet a bit:D

    Just one basic question - what are headers and what do they do specifically? All the definitions i've found so far is that they are a "map" between cpp's. Cheers..


Comments

  • Registered Users Posts: 2,082 ✭✭✭Tobias Greeshman


    They are basically files that are copied into the .cpp file where the #include directive is present. They normally contain type, function, class definitions. The compiler needs these definitions if you are to use these functions eg. cin, cout, printf, MessageBox, etc. Or types DWORD, BYTE, ULONG, size_t, etc.

    By including a type, classes header in another file you can use that type or class in that file. That's how the become a map between .cpp files.


  • Moderators, Music Moderators Posts: 1,481 Mod ✭✭✭✭satchmo




  • Registered Users Posts: 847 ✭✭✭Proxy


    satchmo wrote:
    Christ, i'm on wikipedia about 14 hours a day for useless stuff and the one time I have a proper question I forget it. Forgive me Wiki! Cheers guys.


  • Moderators, Music Moderators Posts: 1,481 Mod ✭✭✭✭satchmo


    Heh I know the feeling, I'm always forgetting about wikipedia and wasting half an hour trawling the web.


Advertisement