![]() |
| ||
| Parsing error Hi all, I used a function called GetRandomVariable to return a double data type and here's its code: double GetRandomNumber(void)but unfortunately i got the following error: Error 1 error C2296: '%' : illegal, left operand has type 'double' |
| ||
| Re: Parsing error double doesn't support the Modulus operator, you will have to implement it yourself if you want to do this. |
| ||
| Re: Parsing error There is hope! Use fmod to resolve the modulus between two doubles
|
| ||
| Re: Parsing error Yes it works...i used the fmod function instead of implementing it by my self. thanks a lot Alex & William |
| All times are GMT -4. The time now is 2:21 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC