6.3w+
社区成员
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;
}