|
From: Astar <As...@tu...> - 2003-04-28 22:02:51
|
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()
i tried to change code to:
template <class T>
class CConteiner {
public:
CConteiner(int optimum);
....
};
template <int optim>
class CScenes:CConteiner<CScene*>{
public:
CScenes();
.....
};
template <int optim>
CScenes<optim>::CScenes(): CConteiner<CScenes*>( optim ){
...
}
but linked error appeared again.... (compiling - ok)
How i can inherit templates like this?
any ideas?
thanx a lot....
PS. source code is approximite, couse i'm trying another ways (
aggregation for example, but it's bad decision)
--
Best regards,
Astar mailto:As...@tu...
|