Operator overloading problems

Falk Hueffner falk.hueffner@student.uni-tuebingen.de
Fri Oct 17 12:27:00 GMT 2003


bruno@codata.com.br writes:

> Hi all,
> 
> I'm having problems trying to compile the following sample code:
> 
> 	// Byte / Byte
> 	Byte operator/ (Byte& b) const {
> 		return Byte (value / b.value);
> 	}

The argument needs to be a const reference. In this case, since Byte
is so small, I'd just pass it by value, though.

-- 
	Falk



More information about the Gcc-help mailing list