I ve created the above function std::vector<int> WorkerAgent::code() {} and i want to define it proper in the header file. I vetried something like
vector<int> codebook(UnitType type);
but i receive the above message error C2039: 'codebook' : is not a member of 'WorkerAgent'
WorkerAgent is a class of my program. Any idea about this?
in your header the declaration (name of the function) needs to match as do the number of parameters, their types... basically the signature needs to be identical. If you do not know what that is do a search for function signature.