parse error before

Peter Doerfler doerfler@techinfo.rwth-aachen.de
Thu Nov 10 13:16:00 GMT 2005


Hi.

On Thursday 10 November 2005 13:59, Graf László wrote:
> Hi
>
> I found the tree2 implementation on the web (see attached file)
> and I try to cmpile it using g++ 3.3.5 on Debian Sarge.
>
> It returns me a lot of "error: parse error before". Why?

It's buggy. Remove the semi-colon in the first line:
#define NULL 0 //no semi-colon here

and put tree2:: in front of the definition of destroy_tree like so:
void tree2::destroy_tree(node *leaf)

Compiled with gcc3.4.4-r1 (gentoo)

HTH, Peter



More information about the Gcc-help mailing list