P
placid
Hi all,
i was just wondering if i have a class
class A {};
then i want to use a multimap like,
multimap<string,A*> as; //can i have a pointer to a A object ?
A* aa = new A();
as.insert(make_pair("First A",aa)); //this doesn't work !
the question is can i have a multimap pair of string, and a class that
i have made (pointer to an object) and what was the other way of adding
to a multimap something like,
aa["First A"] = aa; //is this right
Thanks in advance
i was just wondering if i have a class
class A {};
then i want to use a multimap like,
multimap<string,A*> as; //can i have a pointer to a A object ?
A* aa = new A();
as.insert(make_pair("First A",aa)); //this doesn't work !
the question is can i have a multimap pair of string, and a class that
i have made (pointer to an object) and what was the other way of adding
to a multimap something like,
aa["First A"] = aa; //is this right
Thanks in advance