D
drsantosh82
Hi,
Is it possible to have an STL map in which the value type (i.e. the
"second" of the pair) does not have an overloaded constructor?
For example, I have a map definition like this:
map<size_t, MyClass> my_map;
but MyClass does not have a default constructor.
Is it possible to define the map in this way? If yes, could someone
kindly post a sample code snippet?
I am getting a linker error when I have any code that attempts to
insert into this map. As long as I leave the map alone, I am not
getting any linker error.
Thanks,
Santosh
Is it possible to have an STL map in which the value type (i.e. the
"second" of the pair) does not have an overloaded constructor?
For example, I have a map definition like this:
map<size_t, MyClass> my_map;
but MyClass does not have a default constructor.
Is it possible to define the map in this way? If yes, could someone
kindly post a sample code snippet?
I am getting a linker error when I have any code that attempts to
insert into this map. As long as I leave the map alone, I am not
getting any linker error.
Thanks,
Santosh