This site is no longer active and is available for archival purposes only. Registration and login is disabled.

ClassEMemory::Copy


ClassEMemory::Copy

Postby ChezDoodles » Apr 21, 2006 @ 8:49pm

Is ClassEMemory::Copy equivalent to memcpy or memmove?

For overlapped memory blocks, memcpy is undefined, but memmove is guaranteed to work even if the blocks are partially overlapped.

Example:
// Insert a position in an array...
memcpy( &a[i], &a[i+1], sizeof(a[0])*j));
...might not work

however...
memmove( &a[i], &a[i+1], sizeof(a[0])*j));
...is guaranteed to work.
User avatar
ChezDoodles
pm Insider
 
Posts: 73
Joined: Jan 24, 2002 @ 11:00pm


Postby edge » Apr 22, 2006 @ 12:04pm

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby edge » Apr 24, 2006 @ 2:56pm

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron