class GridElem {
public:
GridElem();
~GridElem();
GirdElem &operator=(const char _idata);
friend char operator-(const GridElem &lhs, const char rhs);
private:
char _data;
};
inline char operator-(const GridElem &lhs, const char rhs) {
return lhs._data - rhs;
}
我不明白,我已经在GridElem.cpp
GirdElem& GridElem::operator=(const char _idata) {
_data = _idata;
return *this;
}
我的配置有什么问题,或者你能发现错误吗?
答案 0 :(得分:4)
您在返回类型
中编写了GirdElem而不是GridElem