S
Simon
Hi,
I have a function that always crashes and I am not too sure why.
Here is the code, (and the value that cause the crash).
#include <math.h>
....
bool ConvertToString( double num, char *szBuffer, int nSize )
{
// number must be +ve
num = fabs(num); // <- Crashes here, (in the fabs
function)
... // more string stuff.
}
The exact number that causes the crash is "10.463055555555556"
any reason why this should happen?
- I am not just converting the number to a string so I need my own function.
- I have no problems with my XP machine, it only happens on my Win98
machine.
- I compiled it on the WinXP machine using VC6.
- The crash error given is "EXCEPTION_FLT_INVALID_OPERATION"
Many thanks in advance again.
Simon
I have a function that always crashes and I am not too sure why.
Here is the code, (and the value that cause the crash).
#include <math.h>
....
bool ConvertToString( double num, char *szBuffer, int nSize )
{
// number must be +ve
num = fabs(num); // <- Crashes here, (in the fabs
function)
... // more string stuff.
}
The exact number that causes the crash is "10.463055555555556"
any reason why this should happen?
- I am not just converting the number to a string so I need my own function.
- I have no problems with my XP machine, it only happens on my Win98
machine.
- I compiled it on the WinXP machine using VC6.
- The crash error given is "EXCEPTION_FLT_INVALID_OPERATION"
Many thanks in advance again.
Simon