return (const std::string &) *this 请问这句是什么意思??
// winei.h
class Wine: private std::string
{
private:
........
........
public:
const std::string & Label()const {return (const std::string &) *this;} // ??
.......
........
}
// winei.cpp
void Wine::Show() const
{
cout << "Wine: " << Label() << endl;
}
return (const std::string &) *this 这句是什么意思?? 小弟不太明白 this不是用来指向wine类 成员和方法的吗?