我是靠谱客的博主 单纯棉花糖,这篇文章主要介绍base operand of '->' has non-pointer type 'const Comple,现在分享给大家,希望可以做个参考。

base operand of '->' has non-pointer type 'const Comple

->操作符前面的操作数类型不是指针类型

 

错误原因 

函数(&对象)

{
 对象名.成员     //正确方式

 对象名->成员     //编译报错  base operand of '->' has  non-pointer type .......

}

 

引用传递的参数应该理解为对象,而不是指针

转载于:https://www.cnblogs.com/mgfsos/p/10455698.html

最后

以上就是单纯棉花糖最近收集整理的关于base operand of '->' has non-pointer type 'const Comple的全部内容,更多相关base内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(58)

评论列表共有 0 条评论

立即
投稿
返回
顶部