我有一个班级桑普。在Samp.cpp中,我可以定义/声明类似
Samp& operator+(Samp& other) { std::cout << "something"; return other; }
这个功能到底是什么?我怎么称呼它?
这实际上是一元+,您这样称呼它:
+
Samp s; +s; // <-- here
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
点击生成二维码
我来说两句