Iterator of STL vector of a template arg fails!

Discussion in 'C++' started by =?ISO-8859-15?Q?R=FCdiger_Kn=F6rig?=, Jun 2, 2005.

  1. I've a nasty problem here (g++ 3.4/4.0):

    I've a template datatype mltreenode<T> from which I instanced a STL vector
    vector< mltreenode<T> * > without any problems. Calling methods on this
    object (e.g. push_back()) doesn't cause any problems. But when I try to
    instanciate an iterator like this:
    vector< mltreenode<T> * >::iterator worst_elem;
    I got the compiler error:
    "Fehler: expected `;' before »worst_elem«"

    Can anyone help please? :-(
    =?ISO-8859-15?Q?R=FCdiger_Kn=F6rig?=, Jun 2, 2005
    #1
    1. Advertising

  2. Rapscallion wrote:

    > Rüdiger Knörig wrote:
    >> I've a nasty problem here (g++ 3.4/4.0):

    > ...
    >> vector< mltreenode<T> * >::iterator worst_elem;
    >> I got the compiler error:
    >> "Fehler: expected `;' before »worst_elem«"

    >
    > typename vector< mltreenode<T> * >::iterator worst_elem;

    Thank you very much!!!!
    =?ISO-8859-15?Q?R=FCdiger_Kn=F6rig?=, Jun 2, 2005
    #2
    1. Advertising

  3. =?ISO-8859-15?Q?R=FCdiger_Kn=F6rig?=

    Rapscallion Guest

    Rüdiger Knörig wrote:
    > I've a nasty problem here (g++ 3.4/4.0):

    ....
    > vector< mltreenode<T> * >::iterator worst_elem;
    > I got the compiler error:
    > "Fehler: expected `;' before »worst_elem«"


    typename vector< mltreenode<T> * >::iterator worst_elem;
    Rapscallion, Jun 2, 2005
    #3
  4. =?ISO-8859-15?Q?R=FCdiger_Kn=F6rig?=

    Rapscallion Guest

    Rapscallion, Jun 2, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    8
    Views:
    1,890
    Csaba
    Feb 18, 2006
  2. n00m
    Replies:
    5
    Views:
    384
  3. zl2k
    Replies:
    27
    Views:
    1,550
    Francesco S. Carta
    Sep 7, 2010
  4. Replies:
    7
    Views:
    161
  5. Replies:
    21
    Views:
    267
    Barry Schwarz
    Mar 5, 2014
Loading...

Share This Page