Convert Number
Posted: Wed Jun 18, 2003 10:12 am
Hi,
I'm looking for the fastest algorithm to convert an unsigned int to string in format x,x,x,x,x. Thanks...
- novice 
I'm looking for the fastest algorithm to convert an unsigned int to string in format x,x,x,x,x. Thanks...
Code: Select all
void convert(unsigned int, char *buf)
{
// need help
....
....
....
}
void main()
{
char buf[1024];
unsigned int x = 2123456;
convert(x, buf);
printf("%s\n", buf); // buf = 2,123,456
}
