why does the following throw this error:
IntelliSense: qualifiers dropped in binding reference of type "string &" to initializer of type "const string"
.h
class A
{
public:
wstring& GetTitle() const;
private:
wstring title;
};
.cpp
wstring& GetTitle() const
{
return this->title;
}
If i remove the const word, it stops complaining, and yet i have never made any changes to the variable?