Hi,
I am having trouble creating a std::set as the datamember in an expression tree's node.
Here is what I have:
I'm stuck with trying to assign the set from the map as the nodes value.Code://an std::map is where the sets are held map<string,set<int> > mapname; //an iterator to the map map<string,set<int> >::iterator mapnameit; //create a std::set set<int> setone; setone.insert(1); setone.insert(2); setone.insert(3); string keyone = "a1"; mapname[keyone] = setone; //Now have a std::map containing one element of: <string,set<int> > //Find the element in the map mapnameit = mapname.find("a1"); //call the node constructor, setting the map's std:: set data member ( 1,2,3 ) as //the nodes data member ExTree* mynode = new ExTree(*mapnameit); //Now the node should contain the set {1,2,3}, but fails to build.
Visual Studio says:
cannot convert parameter 1 from 'std:air<_Ty1,_Ty2>' to 'std::string'
Thanks for any help, it's most appreciated![]()



LinkBack URL
About LinkBacks
air<_Ty1,_Ty2>' to 'std::string'



