对Integer和String的引用

Reference to Integer and String

本文关键字:引用 String Integer      更新时间:2023-10-16

谁能解释一下为什么在vc++ 12中String &s = String ("this");int &d = int(10);初始化非const引用时调用哪些操作符。

谢谢。

错误前提:string &s = string("this"); 不是有效的c++。左值引用不能绑定到右值

相关文章: