STL list as a data member in a class

Hi guys,
I'm trying to define a new class which uses STL list as a data member in the it's private section.
This list's is other class I've declared before. When I try to compile it the Visual generates this error:
error C2208: 'std::list<_Ty>' : no members defined using this type

I've searched in the web to understand this error but I couldn't get it; Here's the code which shows the problem. Thanks!

1
2
3
4
5
6
class newClass{
private:
	list<PreviousClass>;  
public:
// ....
};
1
2
3
4
5
6
class newClass{
private:
	list<PreviousClass> listname;  
public:
// ...
};
Thanks!
Topic archived. No new replies allowed.