C++: Reference to “out of scope” object

前端 未结 3 763
慢半拍i
慢半拍i 2020-12-20 18:33

There is one thing I never understood about references and I hope that one might help me. For all I know, a reference cannot be null. But what happens if you have a function

3条回答
  •  清酒与你
    2020-12-20 18:49

    nothing before you use the returned reference - then you'll be reading/writing over your stack

提交回复
热议问题