NaN in C++ zurückgeben
English
Deutsch
Seit C++11 ist das Zurückgeben von NaN als double so einfach wie
return_nan_double.cpp
#include <cmath>
return std::nan("");Falls du ein float zurückgeben möchtest, verwende
return_nan_float.cpp
#include <cmath>
return std::nanf("");Im seltenen Fall eines long double verwende
return_nan_longdouble.cpp
#include <cmath>
return std::nan("");Check out similar posts by category:
C/C++
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow