Things of work
const char *base = "BLAH BLAH BLAH";unsigned int idx = 0;char *buf = NULL;buf = (char *) malloc (strlen (base) + sizeof (unsigned int));sprintf (buf, "%s%d", buf, idx);printf ("buf: %s\n", buf);
BLAH BLAH BLAH0
張貼留言
沒有留言:
張貼留言