0

Hi all,

I used a function called GetRandomVariable to return a double data type and here's its code:

```
double GetRandomNumber(void)
{
// Zi = (AZi-1 + C)(mod m)
// Zi = (5Zi-1 + 3)(mod 16)
RandomVariableGenerator::Znode = (double)((5.0*RandomVariableGenerator::Znode + 3) % 16);
return RandomVariableGenerator::Znode/16;
}
static double Znode = 7.0;
```

but unfortunately i got the following error:

Error 1 error C2296: '%' : illegal, left operand has type 'double'