c++ - Copy a little count of bytes -


how possible write more laconical not using memcpy?

memcpy(pdest, psrc, 4);  (int = 0; < 4; i++)    pdest[i] = psrc[i];  

because calling memcpy not optimal

#include <cstdint>  *(uint32_t*)pdest = *(uint32_t*)psrc; 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -