Proper definition

Feb 7, 2012 at 11:58pm
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?
Feb 8, 2012 at 12:00am
Feb 8, 2012 at 12:03am
opps, my mistake
Feb 8, 2012 at 12:40am
anyone?
Feb 8, 2012 at 1:09am
Yes, codebook is not a member of your class.

You have created...
 
std::vector<int> WorkerAgent::code() {}


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.
Last edited on Feb 8, 2012 at 1:11am
Topic archived. No new replies allowed.