hi
I use fc15 32-bit gcc-4.6.0 and use ofstream to write to my file but some times (I think when the number is too big) it write the unsigned 64-bit value as a negative number.
long long values;
ofstream myofs;
myofs<<values;
example :
content of file :
#1 #2 #3
-890293098,282786526,-1173079624
402328885,1449293752,-1046964867
how can I sure that this is the problem and fix it?
A longlong is not an unsigned value by default, so the stream will interpret it as such. Realize that the value written to the file is based on the type you give it, not the underlying bits or anything.