RE: [Dev-C++] templates and inheritance
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <iv...@at...> - 2003-04-29 04:26:11
|
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Astar
> Sent: Tuesday, April 29, 2003 1:02 AM
> To: Dev-Cpp mail list
> Subject: [Dev-C++] templates and inheritance
>
>
> Hello Dev-Cpp,
>
> I have some problems with using templates.
>
> i have template like:
>
> template <class T, int optimum>
> class CConteiner {
> .......
> };
>
> and i want to make child from it. something like:
>
> CScene{.....};
> class CScenes:public CConteiner<CScene*, 4>{
> ........}
>
> its ok, when i compile it, but when i try to link it, i have error.
> something like:
> unresolved link to CConteiner<CScene*, 4>::CConteiner()
This code compiles. Find the differences. :)
template <class T, int optimum>
class CConteiner
{
};
class CScene{};
class CScenes:public CConteiner<CScene*, 4>
{
};
int main()
{
}
Ioannis Vranos
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net
Anti-racism movement: http://www.positive-youthfoundation.org
Iraq Peace Pledge: http://www.peacepledge.org
|