C ++:有人可以向我解释一个C / Hw的家伙,参考(&)和指针之间的区别是什么? [英] C++: can someone explain to me, a C/Hw guy, what the diff is between a reference (&) and a pointer?

查看:57
本文介绍了C ++:有人可以向我解释一个C / Hw的家伙,参考(&)和指针之间的区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么以及在哪里应该使用哪一个?


口头上,对我来说似乎是语义 - 但显然有一些

实际差异使得参考文献不同或者更可取

在某些情况下超过指针...


TIA

And why and where one should use one vs. the other?

Verbally, it seems like semantics to me--but obviously there is some
actual difference that makes references different and or preferable
over pointers in some cases...

TIA

推荐答案



" bo" < bo@cephus.com>在消息中写道

"bo" <bo@cephus.com> wrote in message
为什么以及在哪里应该使用一个与另一个?

口头上,它对我来说似乎是语义 - 但显然有一些
实际差异使得参考文献在某些情况下与指针不同或者更可取......
And why and where one should use one vs. the other?

Verbally, it seems like semantics to me--but obviously there is some
actual difference that makes references different and or preferable
over pointers in some cases...



http://www.parashift.com/c++-faq-lit...s.html#faq-8.6


Sharad



http://www.parashift.com/c++-faq-lit...s.html#faq-8.6

Sharad


bo写道:
以及为什么以及应该使用哪一个与其他人相比?

口头上,对我来说似乎是语义 - 但显然有一些实际的差异使得参考文献在某些情况下与指针不同或者更可取
...
And why and where one should use one vs. the other?

Verbally, it seems like semantics to me--but obviously there is some
actual difference that makes references different and or preferable
over pointers in some cases...



参考文献更容易优化。


-

Ioannis Vranos

http://www23.brinkster.com/noicys


Sharad Kala写道:
Sharad Kala wrote:
http: //www.parashift.com/c++-faq-lit...s.html#faq-8.6




我没有找到特别常见问题有用。更确切地说,我相信它

充满了(很好地称为)废话。


你认为它有用吗?


-

Ioannis Vranos

http://www23.brinkster.com/noicys


这篇关于C ++:有人可以向我解释一个C / Hw的家伙,参考(&amp;)和指针之间的区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆