|
Boost Users : |
Subject: Re: [Boost-users] More problems...
From: Ryan Gallagher (ryan.gallagher_at_[hidden])
Date: 2010-02-01 19:54:14
Daniel Veneros <dann.vd <at> gmail.com> writes:
> I tried this but I got lots of errors:
Sometimes it helps to include some of the errors you think are relevant.
[snip]
> typedef std::pair<boost::interprocess::basic_string, Employee> ValueType;
[snip]
> MyMap m*mymap = segment.construct<MyMap>("MyMap")(alloc_inst);
I assume this was intended to be "MyMap *mymap = ..."
[snip]
> mymap->insert(std::pair<"Hello", john>(boost::interprocess::basic_string,
Employee);
You have your types and values switched with the std::pair<> constructor.
Try changing the last line to:
mymap->insert(ValueType("Hello", john));
-Ryan
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net