关于c参数返回返回临时变量返回局部变量地址错误的解决
简书链接:关于c参数返回返回临时变量返回局部变量地址错误的解决
文章字数:117,阅读全文大约需要1分钟
错误代码
1 | FBox* UIActorExtensionMethods::GetComponentsBoundingBoxX(AActor* This) |
![MDYO%J~RT3CM4H2{[T]PZ}W.png](https://upload-images.jianshu.io/upload_images/2815884-997f59adf8273f85.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
推荐使用传递引用的办法。
1 |
|
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 情迁博客!
评论
简书链接:关于c参数返回返回临时变量返回局部变量地址错误的解决
文章字数:117,阅读全文大约需要1分钟
错误代码
1 | FBox* UIActorExtensionMethods::GetComponentsBoundingBoxX(AActor* This) |
![MDYO%J~RT3CM4H2{[T]PZ}W.png](https://upload-images.jianshu.io/upload_images/2815884-997f59adf8273f85.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
推荐使用传递引用的办法。
1 |
|