[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: template & inheritance problem
From: |
Paul Pluzhnikov |
Subject: |
Re: template & inheritance problem |
Date: |
Tue, 04 Jul 2006 08:21:02 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
"matrut" <matrut@gmail.com> writes:
> I'm using g++ ver. 3.3.6 and got trouble as follows:
Try posting a complete compilable example.
Your code (as posted) fails to compile with gcc-3.3.2 and 3.4.0;
I very much doubt it compiles with 3.3.6 either.
"virtual" can't be used here:
> template<class T> virtual class CAbstractQueue
> {
> public:
> CAbstractQueue(void){}
> ~CAbstractQueue(void){}
> };
>
> template<class T> class CQueue : public CAbstractQueue<T>
> {
> public:
This:
> CQueue(void): CAbstractQueue() {}
Should be:
CQueue(void): CAbstractQueue<T>() {}
> ~CQueue(void){}
> ...
Missing ';' here:
> }
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.