Hallur Dalsgaard, vi har samme problem
Jeg har en klasse med nogle pointere og vektorer. Jeg har valgt ikke at bruge memcpy, fordi jeg har læst denne artikel,
http://www.icu-project.org/docs/papers/cpp_report/the_anatomy_of_the_assignment_operator.htmlsom siger,
"Keep in mind one thing: memcpy() is evil! It's a C construct you should never use in C++. memcpy() operates on bits and bytes, not on objects. At best, it just looks ugly and forces you to be concerned with things you shouldn't need to worry about, like the size of TBar. At worst, it fails to take into account what's actually being stored in the objects you're copying, leading to erroneous results, or even uglier code that takes the special cases into account. Never use memcpy() in C++ code. There are always better, more object-oriented ways to do the same thing."
Faktisk en meget god artikel, som forklarer det hele meget godt.