| View previous topic :: View next topic |
| Author |
Message |
HexDump
Joined: 07 Jun 2005 Posts: 70
|
Posted: Tue Mar 28, 2006 8:21 pm Post subject: itoa missing? |
|
|
Hi everyone,
I know itoa is not ansi C, but I´m wondering if it is any version of this funcion in the psp sdk. I could write mine, but I´m just curious.
Edit: I have noticed a _itoa exists in the libc/stdlib.h folder but if I include this, I get symbol collisions with the stdlib.h that it includes by default :/.
Thanks in advance,
HexDump. |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Wed Mar 29, 2006 4:00 am Post subject: |
|
|
sprintf() should do the trick, don't you think? _________________ GE Dominator |
|
| Back to top |
|
 |
HexDump
Joined: 07 Jun 2005 Posts: 70
|
Posted: Wed Mar 29, 2006 4:04 am Post subject: |
|
|
sure, it will. I was ofuscated :).
Thanks.
HexDUmp. |
|
| Back to top |
|
 |
PeterLeRoi
Joined: 16 May 2007 Posts: 31
|
Posted: Sun Jun 03, 2007 11:44 pm Post subject: |
|
|
I can´t do the trick :(
I need to do:
| Code: | int size = XXXXX; (any value)
sceIoWrite(fp,itoa(size),4); |
and it should be written in LBS Hex.
I´m trying with:
| Code: | char bufferaux[5];
sprintf(bufferaux,"%d",size);
sceIoWrite(fp,bufferaux,4) |
but doesn´t work.
One example: if I had int size = 16;
I need to write "0x10 0x00 0x00 0x00"
Can anybody help me? I´m new at programming psp.
Thanks ;) |
|
| Back to top |
|
 |
rapso
Joined: 28 Mar 2005 Posts: 147
|
Posted: Mon Jun 04, 2007 1:00 am Post subject: |
|
|
| try |
|
| Back to top |
|
 |
PeterLeRoi
Joined: 16 May 2007 Posts: 31
|
Posted: Mon Jun 04, 2007 6:35 am Post subject: |
|
|
What is "%x" for? hex integer? Do I need to worry about the Less Significant Bit?
Thanks ;) |
|
| Back to top |
|
 |
|