Problem with program :S

Philipp Thomas pth@suse.de
Fri Jul 18 11:54:00 GMT 2008


* Luis Molina (lufemo@gmail.com) [20080717 22:46]:

>  I have the class
> 
>  struct foo {
>  int a;
>  char b;
>  }
> 
>  struct Y{
>   fpos_t pos;
>  struct foo RECORD;
>  }
> 
>  well something like that, if I do this
> 
>  Y  * REC

Either make that

Y REC;

a
or Y *REC = new Y;

>  error: no match for 'operator+='
>  error: no match for 'operator=' in 'REC->Y::pos = ftell(((X*)this)->X::FD)

You fail to state on which paltform and with which version of g++ you're
getting these errors. Fixing the obvious errors in the code fragments you
posted, I don't get either errors or warnings with gcc 4.2.1. So please post
a complete test case that reproduces theses errors.

Philipp



More information about the Gcc-help mailing list