语法小问题

来源:互联网 发布:棉被芯什么牌子好 知乎 编辑:程序博客网 时间:2024/06/11 05:36

#include <iostream>using namespace std;int main(){int *p = NULL;int *&t = p;*t = 3;cout << *t++ << endl;return 0;}


int *&t  = p ; t为指针*p的引用

*p = NULL;

不能直接给*p赋值

0 0
原创粉丝点击