c语言二级指针简单练习

char **str;
    char *p=(char *)malloc(1024);
    memset(p,0,1024);
    strcpy(p,"123w213");
    str=&p;
    cout<<*str<<endl;
    if(str)
    {
        free(str);
        str=NULL;

        cout<<"free"<<endl;
    }
posted @ 2022-07-04 10:57  萧海~  阅读(29)  评论(0编辑  收藏  举报