M
mathieu
hi there,
I do not understand the syntax for ios_base:recision. Let say I
have a floating point:
const float f = 0.313244462;
How do I write is to a stream ?
const float f = 0.313244462;
std::cout << f << std::endl;
This truncate my number to an arbitrary number of digit after the
decimal point. all I am trying to do is write all meaningfull digit so
that when rereading this number from disk, I can find *exactly* the
same floating point number (I am using 'float' type and not 'double'
type).
Thanks
-Mathieu
I do not understand the syntax for ios_base:recision. Let say I
have a floating point:
const float f = 0.313244462;
How do I write is to a stream ?
const float f = 0.313244462;
std::cout << f << std::endl;
This truncate my number to an arbitrary number of digit after the
decimal point. all I am trying to do is write all meaningfull digit so
that when rereading this number from disk, I can find *exactly* the
same floating point number (I am using 'float' type and not 'double'
type).
Thanks
-Mathieu