
El 19/06/2013 23:10, Riskybiz escribió:
I'm now having trouble reading from the vector in the shared memory. I get an exception when calling read(0) or read(1). What I'm trying to do is read "testing testing 123" from the first element of the sharedSegmentVector. Is it necessary to use some particular type conversion technique in the reader function to access a sharedSegmentVector string element? Any help to get this working is much appreciated; I've been trying for more than a month to get to this point! Code below.....
I just glanced but I don't see anything wrong in your code, but you are
creating temporaries in your read function, this can be optimized.
Something like:
//Reader
std::string read(long index)
{
scoped_lock