[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: |
27 Oct 2005 10:27:47 -0400 |
In article <deX5f.3620$fc7.3306@newsread3.news.pas.earthlink.net>,
Mike Wahler <mkwahler@mkwahler.net> wrote:
>
>"Greg Comeau" <comeau@panix.com> wrote in message
>news:dj89bm$3ri$1@panix1.panix.com...
>> 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.
>
>Is not 'enum' an integral type?
Not in C++, but can be _promoted_ to one.
--
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?
- help with operator%, Al-Burak, 2005/10/19
- Re: help with operator%, GB, 2005/10/19
- Re: help with operator%, Greg Comeau, 2005/10/20
- Re: help with operator%, Mike Wahler, 2005/10/20
- Re: help with operator%, Greg, 2005/10/20
- Re: help with operator%, Simon Buchan, 2005/10/27
- Message not available
- Re: help with operator%, Greg Comeau, 2005/10/27
- Re: help with operator%, Greg Comeau, 2005/10/27
- Re: help with operator%,
Greg Comeau <=
Re: help with operator%, Mike Wahler, 2005/10/19
Re: help with operator%, address@hidden, 2005/10/20