I'm trying to do something like this:

MainClass.h:
Code:
#ifndef __MAIN_CLASS_H
#define __MAIN_CLASS_H

#include "SecondaryClass.h"

class MainClass
{
	private:
		SecondaryClass *secondaryClass;
		
	public:
		MainClass();
		~MainClass();
	
};

#endif
SecondaryClass.h:
Code:
#ifndef __SECONDARY_CLASS_H
#define __SECONDARY_CLASS_H

#include "MainClass.h"

class SecondaryClass
{
	private:
		MainClass *m_mainClass;
		
	public:
		SecondaryClass( MainClass* );		
		~SecondaryClass();
};

#endif
And I get the following errors:

In file included from MainClass.h:4,
from main.cpp:2:
SecondaryClass.h:9: error: ISO C++ forbids declaration of `MainClass' with no type
SecondaryClass.h:9: error: expected `;' before '*' token

make.exe: *** [main.o] Error 1
I'm sure this is because I am including a file that includes the file I'm currently in.

The point of this being that MainClass has a member variable of Secondary class, which also has a reference to the MainClass that instantiated it.

Any ideas on how to accomplish this?