KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is it better to use std::memcpy() as shown below, or is it better to use std::copy() in terms to performance? Why? char *bits = NULL; ... bits = new (std::nothrow) char[((int *) copyMe->bits)[0]]; if (bits == NULL) { cout << "ERROR Not enough memory.\n"; exit(1); } memcpy (bits, copyMe->bits, ((int *) copyMe->bits)[0]);
Tags (comma-separated)
Save Edits
Cancel