" "? , , Linux. gdb .
: , , , . , , . . .
( C), , NaN. . , int, 0, NaN .
If you need variables or an array initialized to NaN, just initialize the variables accordingly when they are declared (as explained by Notinlist and Rafael). You can use some macros if you really don't want to repeat this ugly long statement every time, something like
#define NaNdouble(X) double X = std::numeric_limits<double>::quiet_NaN();
source
share