Operator overloading problems

bruno@codata.com.br bruno@codata.com.br
Fri Oct 17 16:55:00 GMT 2003


Fixed:

    // Byte = int
    const Byte& operator= (int b) {
        value = b;
        return *this;
    }

Thaks.

Bruno


> Note that your assignment operator for int's should also normally
> return a Byte reference rather than void.
>
> Lyle
>
> -----Original Message-----
> From: bruno@codata.com.br [mailto:bruno@codata.com.br]
>
> Ok. It worked with const references. Thank you.





More information about the Gcc-help mailing list