Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Noob Q: Headers in C++

  • 23-01-2006 03:42PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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.


  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo




  • Registered Users, Registered Users 2 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.


  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo


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


Advertisement