Re: The use of a header file

From: Francis Glassborow (francis_at_robinton.demon.co.uk)
Date: 04/08/04


Date: Thu, 8 Apr 2004 09:40:54 +0100

In message <9D1dc.12088$JTG1.9280@news04.bloor.is.net.cable.rogers.com>,
Cerf <dark_temp@hotmail.com> writes
>Yo yo yo
>
>Just like the extern keyword, I want to varify the use of a header file.
>
>>From what I have learned, a header file will contain a struct and there will
>be a corrisponding .cpp file with all the functions used in that header
>file. Right?

Idiomatically a header file will contain the definition of a struct
(more usually a class in C++) and its implementation will be in a
separate .cpp file. A class/struct defintion consists primarily of
declarations of its members. The implementation file consists of the
definitions of the member functions (the defintions of data members are
provided by calling a constructor).

-- 
Francis Glassborow      ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects


Relevant Pages

  • Re: metadata operation failed (8013110E) : Database file is corrupt and may not be usable.
    ... This is an established project that has been compiling for several ... I can only add two more members to my ... tried adding an additional header file with no result. ... >slightly different metadata in two modules for the same type. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C++ api ?
    ... their members and methods available. ... > input string to int. ... > Well also one has to include the appropriate header file as well!! ...
    (comp.lang.cpp)
  • Events from the WebBrowser control
    ... The MSDN documentation for DWebBrowserEvents2 says that it derives ... when I look at the header file I ... see that DWebBrowserEvents2 derives directly from IDispatch and does not ... add any additional members. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Is CppUnit un-C++
    ... > Derrick Coetzee wrote: ... >> Typically, nothing in a header file contains local variables anyway, ... That is to say class type used as members of the class being ...
    (comp.lang.cpp)