Sscanf float decimal numbers
#1

How to approximate a float number when it is read by sscanf?

Number inside file: -819.46,1057.05,29.92
Stored: -819.460021 1057.050048 29.920000

I already tried "2.f" or something similar to specify how much decimal sscanf should take
Reply
#2

What? You're not making any sense. You can only truncate decimals when you're outputting the value as a string.
Reply
#3

Oh, okay.
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)