69,382
社区成员
发帖
与我相关
我的任务
分享
void GetMemory2(char **p, int num)
{
*p = (char *)malloc(num); ----
} |
void Test(void) |
{ |
char *str = NULL; |
GetMemory(&str, 100); |
strcpy(str, "hello"); |
printf(str); |
free(str); //----> here ---- |
}