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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -