using mod(%) operand on double data

  • Thread starter Thread starter duraisridhar
  • Start date Start date
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
 
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
 
Back
Top