[Dev-C++] no class template named `iterator' in `std'
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Napoleon A. <nah...@so...> - 2002-09-04 15:46:15
|
Hello,
Please I have this error that i need help with:
In file included from Nodes.h:5,
from Nodes.cpp:1:
AutoVector.h:11: no class template named `iterator' in `std'
make.exe: *** [Nodes.o]
Error 1 Execution terminated
I have tried #include <Iterator.h> and also checked if the file Iterator was
present in /g++-3 and it was. The section of code with the problem is:
template<class T>
class const_auto_iterator: public
std::iterator<std::forward_iterator_tag, T const *>
{
public:
const_auto_iterator () : _pp (0) {}
const_auto_iterator (std::auto_ptr<T> const * p) : _pp (p) {}
bool operator != (const_auto_iterator<T> const & it) const
{ return it._pp != _pp; }
bool operator == (const_auto_iterator<T> const & it) const
{ return it._pp == _pp; }
const_auto_iterator operator++ (int) { return _pp++; }
const_auto_iterator operator++ () { return ++_pp; }
T const * operator * () { return _pp->get (); }
T const * operator-> () { return _pp->get (); }
private:
std::auto_ptr<T> const * _pp;
};
Thanks
Napoleon.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.384 / Virus Database: 216 - Release Date: 21/08/2002
|