help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with operator%


From: Greg Comeau
Subject: Re: help with operator%
Date: 20 Oct 2005 10:24:54 -0400

In article <f6D5f.1445$mV4.1167@dukeread02>, GB  <gb@invalid.invalid> wrote:
>Al-Burak wrote:
>>       protected: float amount;
>:
>>    return tmp = lhs.amount % rhs.amount;
>:
>> What am I doing wrong?
>
>You are attempting to use the '%' operator on floats. The operator can 
>be used only on integral types.

... and enum's.
-- 
Greg Comeau /     Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout
World Class Compilers:  Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]