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.
|