numeric_limits und nicht aufgelöstes externes Symbol?
-
Hi,
ich habe ein naeS, wenn ich numeric_limits verwende und davon quiet_NaN() und infinity().
Und zwar:MSVC6.0 Compiler tob schrieb:
main.obj : error LNK2001: Nichtaufgeloestes externes Symbol "public: static union _STL::_L_rep const _STL::_LimG<bool>::_L_qNaN" (?_L_qNaN@?$_LimG@_N@_STL@@2T_L_rep@2@B)
Debug/Forschung.exe : fatal error LNK1120: 1 unaufgeloeste externe VerweiseIch werd daraus nicht schlau, kann mir jemand helfen?
Der Code looked so:#include <limits> ... long double real = res.real(); long double imag = res.imag(); if(numeric_limits<long double>::infinity() == std::abs<long double>(real) || numeric_limits<long double>::quiet_NaN() == std::abs<long double>(imag) || numeric_limits<long double>::infinity() == std::abs<long double>(imag) || numeric_limits<long double>::quiet_NaN() == std::abs<long double>(real)) throw "Zu grosse Betraege.";
wobei res ein complex<long double>.
MfG Eisflamme
-
Probier mal
#include <limits> ... long double real = res.real(); long double imag = res.imag(); if(std::numeric_limits<long double>::infinity() == std::abs(real) || ...
-
Das std:: davor bringt auch nichts; allerdings, wenn ich nicht quiet_NaN verwende, dann kommen die Fehler auch nicht.
MfG Eisflamme
-
Frag bitte mal std::numeric_limits<long double>::has_quiet_NaN ab. Kommt da vielleicht ein 'false'.