>>where do I write the include commands for these header files
Not sure what you mean by that. Do you mean #include <myheader.h> ?
>> instantiate the headers
Headers are not instantiated. Only objects and POD (Plain-Old-Data) are. So again, I don't know exactly what you are saying.
Maybe post an example of what you want to do will help clarify your problem.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Include directives always, always go at the top of *.c and *.cpp files, you will often also see them in *.h files. If the program consists of more than one *.cpp or *.c file then the include directive should appear at the top of each file in which the object referenced in the include file will appear. Example: you have main.cpp and CATCenterNetClient.cpp, but only CATCenterNetClient.cpp will reference something in CATCenterNetClient.h then only put CATCenterNetClient.h. at the top of CATCenterNetClient.cpp. If both main.cpp and CATCenterNetClient.cpp reference something in CATCenterNetClient.h then add the include directive at the top of both main.cpp and CATCenterNetClient.cpp.
This matters only to inform the compiler about the classes and definitions used in the *.cpp files. It doesn't really matter if you include CATCenterNetClient.h in *.cpp files that do not use it, all it does is make compile time a little longer. The compiler will ignore CATCenterNetClient.h if it is not referenced in the a *.cpp file.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343