Iterator of STL vector of a template arg fails!

  • Thread starter =?ISO-8859-15?Q?R=FCdiger_Kn=F6rig?=
  • Start date
?

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

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? :-(
 
R

Rapscallion

Rüdiger Knörig said:
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;
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top