Quote Originally Posted by laserlight View Post
Good catch, especially since Card is not a POD type so the memcpy() is suspect.
Right. The memcpy() invokes undefined behaviour, since Card is non-POD.

Ishida, you cannot use memcpy() on an array of Card objects. The Card object contains a std::string, therefore the only way to copy is to use the proper copy construction and assignment.

That's why "pakk" should either be a vector<Card> or vector<Card*>, more than likely a vector<Card*> due to the BITMAP* member in the Card class.

Regards,

Paul McKenzie