In C++, remove the .h and prefix with a c. In C++, they will be placed in the std namespace, but are also global.
8
votes
In C++ it's more idiomatic to use std::copy than C's memcpy, although the latter does work just as well. To get std::copy, you need to #include <algorithm>.
There's not a direct C++ equivalent to realloc, though.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more