View Single Post
Old Apr 5th, 2006, 11:14 AM   #4
Animatronic
Programmer
 
Join Date: Jun 2005
Posts: 99
Rep Power: 4 Animatronic is on a distinguished road
	class Players
{
 private:
        struct playerRec
	{
		char name[25];
		int age;
		int goals;
		struct historyRec* historyPtr;
		struct playerRec* next;
	};

	struct playerRec startPtr;

	struct historyRec
	{
		char club[25];
		int dateJoined;
		int dateLeft;
		struct historyRec* next;
	};
};

These are forward declarations for a struct named historyRec, your historyRec has the full name Players::historyRec.

In C to reffer to a struct you would do struct historyRec, in C++ the struct part isnt needed, as historyRec is a new type, and is only used like this todo forward declarations.

To fix your problem change struct historyRec to just historyRec (this may not work havent checked) or Players::historyRec.

Also you will probably have to move the definition for historyRec above playerRec (or use a forward declaration ).
Animatronic is offline   Reply With Quote