   Alternative to memcpy in C++?
  ? 
  Just use memcpy. Seriously, why would you want something else? ;  maybe because it copies BYTES *duh* ;  If you do want something else (i.e. type safety) use std::copy from <algorithm>.Enigma ;  std::copy()   You should never let your fears become the boundaries of your dreams. ;  google for memcpy_amd.cpp and memcpy_amd.h ;  memcpy can copy to and from byte alignment, the actual copy in all likelyhood, uses a dword rep mem sto for the aligned block.There''s also memmove. ;  std::copy should ALWAYS be prefered to memcpy unless speed is of great important and you are copying POD types ;quote:Original post by Puzzler183  Just use memcpy. Seriously, why would you want something else?   Because direct memory manipulation undermines the type system. You should strive to avoid use of memcpy and friends.;  Hello The C modest god,I will take issue with what SabreMan said about not using memcpy."Because direct memory manipulation undermines the type system."Type of system is exactly why you should use memcpy and its friends. And what C/C++ program that does anything complex doesn''t use some were direct memory manipulation?memcpy is perfectly fine to use and should be use over most other methods for the biggest reason of all.Every C/C++ compiler has a memcpy as part of it standard C library.And as since it is part of the standard C library it is Cross Platform.Now it can be true that the implementation of memcpy can vary, it is for the most part fine to use and should get the same results no matter what type of system your on.Now if you want to get a little better performance then there are memcpy like functions that use MMX or other instruction sets to achieve greater speed.Lord Bart