Re: A question I'm ashamed to ask
Re: A question I'm ashamed to ask
- Subject: Re: A question I'm ashamed to ask
- From: Daniel Ström <email@hidden>
- Date: Wed, 20 Oct 2004 20:32:02 +0200
Looks to me as if you'd want to use sprintf.
char *something = malloc(as_much_space_as_you_need);
int the_value;
sprintf(something, "%x", the_value);
If you need more help, then you can use the terminal, and write "man
sprintf", and press enter.
There is help for the entire standard C library.
Best regards
Daniel Strom
20 okt 2004 kl. 19.48 skrev April Gendill:
Ok. I work with plain old ansi c so little that this has escaped me.
In one of my application I need to take a plain old C character array
and make it into a string but the string needs to use a conversion
character.
so I basically I need
char * something = "%x", someInteger;
basically I need to convert the integer into it's hex value and place
it in the string.
I can't figure out how to do this.
April.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden