它实际上是地狱。有人可以用简单的英语解释为什么以下部分工作或没有?C++返回类型限定词heaven
class Hey;
class Bitmap {
public:
const Hey* const& getHey() { return hey; }; // works
const Hey* & getHey2() { return hey; }; // error C2440: 'return' : cannot convert from 'Hey *' to 'const Hey *&'
private:
Hey* hey;
};
你说的这个'Fair'是什么意思? – 2011-02-08 13:48:43