c/c++学习01

shangs00 2020-01-30

c++指针初始赋值:

//指针初始赋值
    int* a = new int(3);
//第二种赋值
        int 初始值 = 100;
        int *b = &初始值;
//由new分配的内存块通常使用过后都要用delete来释放内存

delete a;

相关推荐