June 02, 2004

Error: Compiler does not speak English

I'm befuddled over this message from my compiler:

initial value of reference to non-const must be an lvalue
"cppcomplex operator+ (const cppcomplex c_b) {return caddf(data, c_b.data);}"

Can any of you decipher this? It's only a warning, but its driving me batty!

(Edit)
Changing the offending line to:

cppcomplex operator+ (cppcomplex c_b)
{
complex_float tmp = caddf(data, c_b.data);
return cppcomplex(tmp);
}

Removes the error, but why?

Posted by Moore at June 2, 2004 10:02 AM