The Dink Network

Reply to sprintf is molesting

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 16th 2005, 11:53 PM
pillbug.gif
Drink
Peasant He/Him Chile
Don't drink 
Again with this thing.

sprintf(crap, "%d", spr[h].damage);
cr := &crap[0];

"crap" is type char[200],
"spr[h].damage" is int, and
"cr" is *char.
So, sprintf what does?
1) Moves the values directly, like if "damage" is FF00FF00, then "crap" will have [FF, 00, FF, 00].

2) Converts the value, like if "damage" is 000000FF (255), then "crap" will have [FF] (255).
It could be prudent if someone puts the description of that procedure, so I can stop molesting with this again.