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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -