c++ - error C2064: term does not evaluate to a function taking 0 arguments -
everyone! maintain group of channel data in map container, individual channel data can accessed channle name. regards this, write simple function getirchanneldata
(please see following code). when compliing, statement pusirchanneldata = cit->second();
throwed error, read
error c2064: term not evaluate function taking 0 arguments
all function nothing search given channel name/id in map container, , assign data pointer temporal pointer if found. please show me what's wrong?
const array2d<unsigned short>* getirchanneldata(std::string schannelname) const { const array2d<unsigned short>* pusirchanneldata = null; (std::map<std::string, array2d<unsigned short>* >::const_iterator cit = m_usirdatapool.begin(); cit != m_usirdatapool.end(); ++cit) { std::string skey = cit->first; if (skey == schannelname) { pusirchanneldata = cit->second(); // error occurred on line break; } } return pusirchanneldata; }
the error message pretty clear... call function doesn't exist. map::iterator
points std::pair
, has 2 member objects, first
, second
. note these not functions. remove ()
line in question , error should go away.
Comments
Post a Comment