Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::interprocess::string
From: Josmon Paul (josmon.paul_at_[hidden])
Date: 2012-01-03 00:44:36


Hi Ion,
              I have a class whose private members are string type of data. Each time i will create a new instance of my class and to each instance i will set some string type of data to it . After this i have to push this object it to the vector.
             Now i have a function called write_data which will take this vector list as input and will iterate through each vector element and push to shared memory vector . Now from this shared memory i have to iterate these objects and i have to get the string data present in these instance. Right now i am declaring this string type of data as boost::interprocess::string and will set this data to the  instance of the class. But it will create segmentation fault when i am accessing this string type of data from the object when the size of string is more than 10. So is there any method to increase the buffer size of boost::interprocess::string .?

Regards
Josmon
          ________________________________

-----boost-users-bounces@lists.boost.org wrote: -----
To: Boost User List <boost-users@lists.boost.org>
From: Ion Gaztaņaga
Sent by: boost-users-bounces@lists.boost.org
Date: 01/02/2012 05:23PM
Subject: Re: [Boost-users] Boost::shared::memory consistency

El 02/01/2012 9:52, Josmon Paul escribiķ:
> Hi
> I was able to construct the vector of strings using basic_string. But my
> problem is not exactly that . I want to store objects in vector list and
> the member of this object are string type. When i accessing this object
> from shared memory, i need to get this string also. So is there any
> solution for this other than adding strings directly to the vector list.

Sorry, but I could not understand your question. Can you add more details?

Ion
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you


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