LayerVector anotherLayer;
const LayerVector& currentLayers(anotherLayer);
我不明白为什么在&
这里使用参考。
编辑:我的耻辱。我只知道可以通过以下方式定义引用。上面的方式让我感到困惑......谢谢你们!
const LayerVector ¤tLayers = anotherLayer
LayerVector anotherLayer;
const LayerVector& currentLayers(anotherLayer);
我不明白为什么在&
这里使用参考。
编辑:我的耻辱。我只知道可以通过以下方式定义引用。上面的方式让我感到困惑......谢谢你们!
const LayerVector ¤tLayers = anotherLayer