呵呵,走到时间的尽头,看来世的路,今朝有酒今朝醉.
void Allocate(char* &p,int size) { p = (char*)malloc(size); } void Test(void) { char *str = NULL; Allocate(str,100); strcpy(str,"Hello World!"); printf(str); free(str); }
posted on 2013-07-16 09:51 Yours风之恋 阅读(208) 评论(0) 编辑 收藏 举报