07-18-2006 10:00 PM
07-19-2006 01:12 AM
It's not exacly clear to me, what you want do to.
Does
#include <ansi_c.h>
char * s ="100";
int a;
sscanf( s,%x,&a);
do what you want ?
07-19-2006 01:29 AM
Thanks, I got it. What I wanted to do was:
int i=100 ;
char *temp[1024]="\0";
Scan (temp, "%s>%d", &i);
Fmt (temp, "%s<%x[w4p0]", i); // the value i will be 256
Regards!
Jacky
07-19-2006 07:38 AM
How about:
int i = 100;
int v = 0;
do {
v = v * 16 + i % 10;
} while (i /= 10);
JR