65,206
社区成员
发帖
与我相关
我的任务
分享
char *getMemory(void){
char *point = new char[12];
strcpy(point, "hello world");
return point;
}
void testCode(void){
char *str = NULL;
str = getMemory();
printf(str);
delete []str;
str = NULL;
}
int main()
{
testCode();
return 0;
}