I have this problem: I want to make my program throw a floating point exceptions when performing operations on invalid floating point numbers:
e.g.
double dNAN;
memset(&dNAN, 0xff, sizeof dNan);//dNan = #NAN
double dTest = 21/dNAN + 32; //I want exception ot be
//thrown here!
Please help me how I can do this. I am using BC++ 5.02 & MSVC++ 6.0, on both I can't achieve this.