Re: [Dev-C++] templates in C++ : precisions
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2003-01-12 11:38:43
|
-------Original Message-------=0D
=0D
From: erwan ancel=0D
Date: =CA=F5=F1=E9=E1=EA=DE, 12 =C9=E1=ED=EF=F5=DC=F1=E9=EF=F2 2003 12:28=
:13 =EC=EC=0D
To: dev...@li...=0D
Subject: [Dev-C++] templates in C++ : precisions=0D
=0D
well, this is my problem:=0D
=0D
I would like to make a template class that owns a set of elements that ha=
ve=0D
the type of one of the class parameters. And it doesn't compile...=0D
example:=0D
=0D
#include <set>=0D
template <class T>=0D
class A=0D
{=0D
public:=0D
A();=0D
B();=0D
std::set<T> _list;=0D
};=0D
=0D
the compiler's output tells that the type T is not defined... Well, of=0D
course, but it will be defined when the template will be instanciated. So=
it=0D
should be possible...=0D
Does anybody know a solution to my problem?=0D
=0D
=0D
=3D=3D> If you remove that B() call, the code should compile.=0D
=0D
=0D
=0D
Ioannis Vranos=0D
=0D
* Programming pages: http://www.noicys.freeurl.com=0D
* Alternative URL: http://run.to/noicys=20
|