I’m getting an error occurring in the vector class, as in, the class which you access when you #include < vector >
I it get only once, and I don’t have a clue why it would be occurring:
error C2036:
'Agent *const ': unknown size
This is also occurring in vector, and the code that has the error is here:
size_type size() const
{ // return length of sequence
return (this->_Mylast - this->_Myfirst); // error on this line
}
This mean that the type
Agentis not fully known at this point. You probably just have forward-declared it, but don’t have a definition visible at this point.The following piece of code exhibit this error:
What you need is to include the file that define the
Agentclass before you use astd::vector< Agent >. The file is probably namedAgent.h.The reason for the error is because in the line of code you pointed, the compiler try to compute the difference between two
Agent const*. This is roughly equal to the difference of the pointer casted tochar const*divided bysizeof(Agent). However, this size is not know if the type is not fully defined.