Ebeworld’s Weblog

Trying to create

Header files

1. It is best to include a.h file in a.cpp at the top to insure order of header files are irrelevant, which is very good design. There could be forward declarations.

A header file should be included only when a forward declaration would not do the job.
a.The size of the class’ objects is not needed.
b.The names or types of any of the class’ members are not needed.
c.The prototypes to or names of any of the class’ member functions are not needed
The header file should be so designed that the order of header file inclusion is not important.
The header file inclusion mechanism should be tolerant to duplicate header file inclusions.

Advertisement

March 29, 2011 - Posted by | Algorithms, CPP, Uncategorized

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.