#define flag_BufferSize 100void main(){ /* Declare the memory pointer. */ char *strString1; char *strString2; int intNumber=5; /* Create the memory. */ strString1 = calloc(flag_BufferSize , sizeof(char)); strString2 = calloc(flag_BufferSize , sizeof(char)); /* Place some stuff in each. */ strcpy(strString1, "Hello"); strcpy(strString2, " world."); /* Combine em. */ strcat(strString1, strString2); /* Print em. */ printf(strString1); /* Append a filename(#intNumber) onto strString2. */ sprintf(strString2, "CPP2Abstract%d", intNumber); /* Reprint em~*/ printf(strString2); /* Free em */ free(strString1); free(strString2);}
Untested, of course~ xD