Original Post
I have two constructors declared in a class, differing in the type of arguments: #ifndef _STAR_TASKEVENT_H_ #define _STAR_TASKEVENT_H_ class MCLARINSHARED_API TaskEvent: public Event { public: TaskEvent(ObjectID ObjectID, MessageID messageID, CompMap object); TaskEvent(ObjectID objectID, MessageID messageID, TaskReportGameStruct& taskReport); } The only difference between the two constructors is in the type of the 3rd parameter, In the first constructor it is of type CompMap and in the second one of type TaskReportGameStruct. So in another class I want to call the second constructor like so: for (TaskReportGameStructList::const_iterator taskReportIterator = taskReportList->begin(); taskReportIterator != taskReportList->end(); ++taskReportIterator) { TaskEvent* taskEvent = new TaskEvent((*taskReportIterator)->getObjectID(), TaskEvent::MESSAGE_CLIENT_NEW, (*taskReportIterator)); } // End for But it seems like it thinks I want to call the first one because I get this error: error C2664: cannot convert parameter 3 from 'Star::TaskReportGameStruct *const ' to 'Star::TaskEvent::CompMap' Why would that be happening? Clearly I am telling it to call the 2nd constructors because I am passing as a parameter an object of type TaskReportGameStruct, and for some reason it is asking for a parameter of type CompMap.