using mod(%) operand on double data

D

duraisridhar

Hi all,

While I try to find the modulus on double data , Compiler throws
following error

"Test.cpp(180): error C2296: '%' : illegal, left operand has type
'double' "

Any work around to over come this compiler error .

Regards,
Sri
 
C

Carl Daniel [VC++ MVP]

Hi all,

While I try to find the modulus on double data , Compiler throws
following error

"Test.cpp(180): error C2296: '%' : illegal, left operand has type
'double' "

Any work around to over come this compiler error .

The mod operator makes no sense when operating on type double, since there's
no remainder. What is it you're trying to accomplish?

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top