Doubles im Expotentialschreibweise darstellen
-
Hallo, gibt es in der CString-Format Anweisung auch ein Flag um Gleitkommazahlen in Expotentialschreibweise darzustellen?
-
guggst du in der MSDN unter CString, das führt zu CStringT::Format, das leitet weiter zu "printf Type Field Characters" . Dort steht u.a. folgendes:
e double - Signed value having the form [ – ]d.dddd e [sign]dd[d] where d is a single decimal digit, dddd is one or more decimal digits, dd[d] is two or three decimal digits depending on the output format and size of the exponent, and sign is + or –.
also:
CString test; float d = 1.2; test.Format(_T("%e"),d);