首页 > 编程知识 正文

试述引用与指针的区别,引用传值和指针传值

时间:2023-05-04 20:44:14 阅读:162558 作者:2321

问题c引入引用类型与传统指针有什么不同呢?

作为参考,一言以蔽之:

areferencecanbethoughtofasaconstantpointer (nottobeconfusedwithapointertoaconstantvalue! ) with automatic indirection,I.ethecompilerwillapplythe * operator for you。

引用是自动嵌套的常量指针

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。