I have several maps containing a multitude of classes in my VC++ project, some of them default constructable, others not. When trying to build, I get a "no appropriate default constructor available" error. The problem is that the error is listed to occur in line 173 of map.cpp, which is the code for operator[]
. It would seem that I'm accidentally calling operator[]
(which implicitly calls the mapped type's default constructor) on one of my non-default constructable maps, but VS doesn't give me any info on where the error originated.
How can I find the part in my code that's causing this problem?