What are the differences between:
#include <xstring>
#include <cstring>
#include <string>
#include <wstring>
?
(anymore? lol)
What are the differences between:
#include <xstring>
#include <cstring>
#include <string>
#include <wstring>
?
(anymore? lol)
Only the latter two are Standard headers. The first is some non-standard header.
#include <cstring>
This is
<string.h>, but with the declarations put into namespacestd. It's the "C++ version" of the C header.
#include <string>
This is where
std::stringis defined. It has nothing to do with the C header.
<string> is where std::string is defined.
<xstring> is a Microsoft C++ header containing the actual implementation of the std::basic_string template. You never need to include that file on your own. <string> includes it for the basic_string implementation.
<cstring> is the standard C string library (strcpy, strcat, etc) placed into the C++ std namespace.