I'm trying to write a tree class and I've just stumbled on a compiling
problem. The compiler throws an error on a piece of code which to my eyes
it is error-free. Can anyone help me with this?
Here is the error message:
<error>
/home/rui/development/C++/mytree/src/tree.h:154: error: expected
constructor, destructor, or type conversion before ?&? token
</error>
Here is the code snippet:
<code>
template <class tData>
class tree
{
public:
//snip
class navigator
{
//snip
public:
navigator();
navigator(const navigator&);
~navigator();
//snip
navigator &operator= (const tree<tData> &);
};
};
//snip
template <class tData>
//the offending line: line 154
tree<tData>::navigator &tree<tData>::navigator::operator= (const tree<tData>
&pointed_node)
{
//snip
}
</code>
Thanks in advance
Rui Maciel
--
Running Kubuntu 5.10 with KDE 3.5.1 and proud of it.
jabber:ru********@jabber.org