11/09/2015

integer to string ( _itoa_s )

see code


...
int increase = 0;
char str[100];
_itoa_s(time(0),str,10); //10 means decimal so 8:octal, 16Lhex, 2:binary
sprintf_s(str, "%s_%d", str, increase);
printf("%s \n", str );


...

No comments:

Post a Comment