// a.h
#ifndef A_H
#define A_H

#include "b.h"
#include "c.h"
#include "d.h"
#include "e.h"
#include "f.h"
#include "g.h"
#include "h.h"

class A:public B		// A inherits from B
{
C theCobject;		//A defines an object in C
D* theDptr; 		// A defines a pointer to an object in D
inline  E foo(		// A::foo returns an object in E
	F anF, 		// A::foo receives an object in F
	G* aGptr, 		// A::foo receives a pointer to an object in G
	H* anHptr)		// A::foo receives a pointer to an object in H
	{
		return aGptr->getE(anHptr);			
				// A::foo invokes a member function in G
	}
};
#endif

Example 1: A file with some unnecessary include directives.

Back to Article