Template class inheriting template class

Can someone please help me clean up the problems I'm having with this following code; I think what I'm trying to achieve is apparent with the code but ask me anything you need to know for me to help you help me. =]

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
template <typename T>
class base: public higherBase
{
protected:
	T primary;
};

template <typename T>
class derived: public base<T>
{
public:
	using base<T>::primary;
	T get() {return primary;}
	void set(T setPrim) {primary = setPrim;}
};

1
2
3
4
5
6
7
int main()
{
	derived<int> test;

	system("pause");
	return(EXIT_SUCCESS);
}

 
1>Source Code\Debug.cpp(12): error C2062: type 'int' unexpected
You don't need to say using base::primary; when using public inheritance.
After some testing around discovered the problem was that I had an enumeration with the same name as the class >.< Silly me.
Topic archived. No new replies allowed.