View Single Post
  #4 (permalink)  
Old 29-Jun-2009, 22:31
ken_yap ken_yap is online now
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,232
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: Shared memory and C++

You have to allocate some space for it somewhere in shared storage. What you are trying to copy is not an object that is all of one piece in memory. It contains a pointer that points to another piece. Therefore your destination object must also be two pieces, one for the base object and one for the auxiliary structure pointed to from the base object.

What C++ could do for you is encapsulate the copying in a deep-copy method.

Also if you find yourself doing casting in C++, most of the time you are doing something wrong.
Reply With Quote