Sign in to follow this  
pauls_1979

GCC compiler doesn't like this, what am I doing wrong?

Recommended Posts

Here's an extremely simplified example of some code from my multi-platform game engine.
template <typename TYPE> class List
{
	public:
	
		class Node
		{
			TYPE	object;
		};
};

template <typename TYPE> class ResourceManager
{
	public:
	
		typedef List<TYPE> ResourceList;
	
		void DoSomething()
		{
			ResourceList::Node	node; // Here's where I get the error.
		}
};

This isn't new code, and I've compiled it many times before (using both Visual Studio and Codewarrior) without any problems. Now I'm trying to compile it for the IPhone (which uses the gcc compiler), and I get this error: ResourceList::Node node; - expected `;' before 'node' I'm assuming this relates to a c++ standard that hasn't been properly supported by the other compilers, but can anybody suggest what I might be doing wrong, and how I might fix it. Thanks in advance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this