Hello,

I'm trying to do the following:

Code:
class base
{
	public:
		
		base(data* p_base_data)	{p_data = p_base_data};

		virtual base* clone(data* p_clone_data = p_data) = 0;
	
	protected:
	
		data* p_data;
};
Every class inherited from base must now have it's own clone function. However there seems to be an error with the default parameter:

Code:
error: invalid use of non-static data member 'base::p_data'
Is a default parameter (using a protected data member) not allowed in this case. Or am I doing something wrong?