对于指针传参的再一次简要的说明
对于简单指针传参的说明#include<stdio.h>#include<malloc.h>#include<string.h>int InitStr(char *str);int main(){ char *ptr = NULL; ptr = (char *)malloc(50); if(ptr==NULL) { return -1; }// ptr = "hello world!"; printf("ptr = %s\n ",ptr)
原创
2020-09-07 09:14:56 ·
124 阅读 ·
0 评论