如果我定义三个对象,如下所示:
const string & textA = messages.at(0),
textB = messages.at(1),
textC = messages.at(2);
Run Code Online (Sandbox Code Playgroud)
是textB和textC实际上是一个参考?
我一定要放置&在两个前textB和textC?
谢谢!
textB而textC不是引用.想象&它好像属于变量,而不是类型.
(刚用g ++检查)
| 归档时间: |
|
| 查看次数: |
273 次 |
| 最近记录: |