[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

template question

Chameleon

10/26/2008 7:39:00 PM

Where is the problem in the code below?

The g++ error message is:
(all throwed in the last line)

`Texture' was not declared in this scope
template argument 2 is invalid
expected `{' before '>' token
expected unqualified-id before '>' token
declaration of `class TextureUnit<K>'

--------------------------------------
template<typename K>
class Texture {};

template<typename K>
class TextureUnit : public ObjectPool<K, Texture<K> > {};
--------------------------------------
7 Answers

Chameleon

10/26/2008 7:40:00 PM

0

O/H Chameleon Yanaoa:
> Where is the problem in the code below?
>
> The g++ error message is:
> (all throwed in the last line)
>
> `Texture' was not declared in this scope
> template argument 2 is invalid
> expected `{' before '>' token
> expected unqualified-id before '>' token
> declaration of `class TextureUnit<K>'
>
> --------------------------------------
> template<typename K>
> class Texture {};

template<typename K, typename V>
class ObjectPool {};

> template<typename K>
> class TextureUnit : public ObjectPool<K, Texture<K> > {};
> --------------------------------------

Kai-Uwe Bux

10/26/2008 8:18:00 PM

0

Chameleon wrote:

> O/H Chameleon ??????:
>> Where is the problem in the code below?
>>
>> The g++ error message is:
>> (all throwed in the last line)
>>
>> `Texture' was not declared in this scope
>> template argument 2 is invalid
>> expected `{' before '>' token
>> expected unqualified-id before '>' token
>> declaration of `class TextureUnit<K>'
>>
>> --------------------------------------
>> template<typename K>
>> class Texture {};
>
> template<typename K, typename V>
> class ObjectPool {};
>
>> template<typename K>
>> class TextureUnit : public ObjectPool<K, Texture<K> > {};
>> --------------------------------------

In case, your question still stands: you have not provided code that
exhibits the problem as the following compiles without trouble

template<typename K>
class Texture {};

template<typename K, typename V>
class ObjectPool {};

template<typename K>
class TextureUnit : public ObjectPool<K, Texture<K> > {};

int main ( void ) {}


Best

Kai-Uwe Bux

Chameleon

10/26/2008 9:55:00 PM

0

>>> Where is the problem in the code below?
>>>
>>> The g++ error message is:
>>> (all throwed in the last line)
>>>
>>> `Texture' was not declared in this scope
>>> template argument 2 is invalid
>>> expected `{' before '>' token
>>> expected unqualified-id before '>' token
>>> declaration of `class TextureUnit<K>'
>>>
>>> --------------------------------------
>>> template<typename K>
>>> class Texture {};
>> template<typename K, typename V>
>> class ObjectPool {};
>>
>>> template<typename K>
>>> class TextureUnit : public ObjectPool<K, Texture<K> > {};
>>> --------------------------------------
>
> In case, your question still stands: you have not provided code that
> exhibits the problem as the following compiles without trouble
>
> template<typename K>
> class Texture {};
>
> template<typename K, typename V>
> class ObjectPool {};
>
> template<typename K>
> class TextureUnit : public ObjectPool<K, Texture<K> > {};
>
> int main ( void ) {}



oooops!
lame!

My fault!

Evan Platt

10/16/2011 3:29:00 PM

0

On Sun, 16 Oct 2011 08:18:37 -0700 (PDT), "who?"
<yourimageunreels@sbcglobal.net> wrote:

>Too high to sing in that key.

You know, that sentence could be completely misunderstood ... :)
--
To reply via e-mail, remove The Obvious and .invalid from my e-mail address.

Nil

10/16/2011 4:48:00 PM

0

On 16 Oct 2011, "who?" <yourimageunreels@sbcglobal.net> wrote in
rec.music.beatles:

>> http://youtu.be/9...
>
> Yeah, that's the song. I had no idea that it was released in
> 1974. Too high to sing in that key.

Yeah, I am, too.

Jeff

10/16/2011 5:30:00 PM

0

On Oct 16, 11:48 am, Nil <redno...@REMOVETHIScomcast.net> wrote:
> On 16 Oct 2011, "who?" <yourimageunre...@sbcglobal.net> wrote in
> rec.music.beatles:
>
> >>http://youtu.be/9...
>
> > Yeah, that's the song. I had no idea that it was released in
> > 1974. Too high to sing in that key.
>
> Yeah, I am, too.

LOL

Jeff

10/16/2011 5:32:00 PM

0

On Oct 16, 10:29 am, Evan Platt
<e...@theobvious.espphotography.com.invalid> wrote:
> On Sun, 16 Oct 2011 08:18:37 -0700 (PDT), "who?"
>
> <yourimageunre...@sbcglobal.net> wrote:
> >Too high to sing in that key.
>
> You know, that sentence could be completely misunderstood ... :)

> To reply via e-mail, remove The Obvious and .invalid from my e-mail address.

Let's talk about people who say they are going to call someone
"up". They don't call them up, they just call them.

:-)