How come this code
std::map m; m[\"a\"]=1;
compiles with (I\'m using MSVC 2010)
#include
As stated, string.h and cstring are C headers (while cstring is basically a C++ wrapper for string.h), containing functions for C strings, which are char[] terminated by '\0'. You want to use the c++ class string, which header is .
string.h
cstring
char[]
'\0'