Derived class not seeing protected Members C++ Header file called by *.cu file

The following is the source code relevant to my problem. My issue is that, on compile, I generate 3 errors, all of which say that a corresponding variable is undefined. I am wondering what could be causing this. I’ve checked over the code several times but all seems to be in place. I can upload relevant parts of the Makefile as well, or of the *.cu file utilizing the header file.

template <class T>

	class slave_object

	{

	protected:

		size_t length;

		T* cpu_object;

		T* gpu_object;

	public:

		slave_object(T* master, size_t len = 1)

		{

			length = len;

			cpu_object = master;

			gpu_object = 0;

		}

	

		virtual ~slave_object()

		{

			release();

		}

		void release()

		{

			if (gpu_object)

			{

				cudaFree(gpu_object);

				gpu_object = 0;

			}

		}

		void update()

		{

			if (!gpu_object)

				cudaMalloc((void**) &gpu_object, sizeof(T) * length);

			cudaMemcpy(gpu_object, cpu_object, sizeof(T) * length,

				   cudaMemcpyHostToDevice);

		}

		operator T* ()

		{

			if (!gpu_object) update(); 

			return gpu_object;

		}

	};

	template <class T>

	class synchronized_object : public slave_object<T>

	{

	public:

		synchronized_object(T* co, size_t len = 1) :

		slave_object<T>(co, len)

		{}

		virtual ~synchronized_object()

		{

			synchronize();

		}

		void synchronize()

		{

			cudaMemcpy(cpu_object, gpu_object, sizeof(T) * length,

			   cudaMemcpyDeviceToHost);

		}

	};

There is no error in this part of code. But I don’t know what is your compiler. I compiled it successfully with VS2008 plus CUDA3.0beta. You may try to clean all the intermediate files and recompile it.

I just wanted to let everyone know that I’ve [SOLVED] the issue by placing this-> in front of each variable I was using from the base class. Idk why that isn’t assumed when using it thru a *.cu file, but it worked.