void funcF(char *outBuffer)
{
char * inBuffer;
inBuffer = (char *) malloc(500);
// add stuff to inBuffer
strcpy(inBuffer, "blabla");
outBuffer = inBuffer; //probably this is wrong
}
int main()
{
char * outBuffer;
funcF(outBuffer);
printf("%s", outBuffer); // i want to get "blabla" as output
free(outBuffer);
}
我的问题是如何outBuffer
指出相同的地址inBuffer
以便我可以访问其中的数据inBuffer
?