码迷,mamicode.com
首页 >  
搜索关键字:getmemory详解    ( 1个结果
GetMemory详解
voidGetMemory1(char*p){p=(char*)malloc(100);}voidTest1(void){char*str=NULL;GetMemory(str);//把str传进去,str是一个指针strcpy(str,"helloworld");printf(str);}char*GetMemory2(void){charp[]="helloworld";returnp;}voidTest2(void){char*str=NULL;str=GetMemory2();pr..
分类:其他好文   时间:2014-09-29 04:06:27    阅读次数:268
1条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!