from http://stackoverflow.com/questions/9257665/difference-between-string-and-string-h
string.h
contains old functions likestrcpy
,strlen
.string
primarily contains thestd::string
class.
|
<cstring>
will usually import the same things as
<string.h>
but into the
std
namespace.
<string.h>
will usually import everything into the global namespace.
string.h
is deprecated within C++. If you need the functionality contained within, you should use the headercstring
.