I need to return QHash value from a function, I test this code in Qt where is the error -
class datainputsetting { public: // constructor datainputsetting(); qhash<qstring,qstring> inputdata; inputdata load(const std::string &file); void save(const inputdata &inputdata, const std::string &file); };
i declare class in following way:
class datainputsetting { public: // constructor datainputsetting(); qhash<qstring, qstring> inputdata; // function returns hash. qhash<qstring, qstring> load(const std::string &file); void save(const inputdata &inputdata, const std::string &file); };
the problem make load()
function return concrete variable (class member). c++ syntax assumes, have declare type
function returns, , not variable name.
Comments
Post a Comment