Saving as hex (reading with sscanf 2.0)
#1

I consider some giant values saving as hex.. would that optimise speed along with files and array sizes?
Main example for everyone :
Money lets say as max can be(as max amount that can be saved.. althought maybe i will use it as "unsigned" by adding 31(-1) bit int all the time)
Код:
2 147 483 647
or
Код:
7FFF FFFF
difference - 2 charaters for file and array is now free.
Reading example :
Код:
sscanf("Money 7FFFFFFF","{s}h",Player money);
Currently writing with hexadecimal...

Written with hexadecimal.. no problems found to date.
Reply


Messages In This Thread
Saving as hex (reading with sscanf 2.0) - by RSX - 30.03.2010, 14:55
Re: Saving as hex (reading with sscanf 2.0) - by RSX - 31.03.2010, 10:23
Re: Saving as hex (reading with sscanf 2.0) - by Dabombber - 31.03.2010, 12:56

Forum Jump:


Users browsing this thread: 2 Guest(s)