Difference between and ?

前端 未结 10 1041
囚心锁ツ
囚心锁ツ 2020-11-27 15:52

How come this code

std::map  m;
m[\"a\"]=1;

compiles with (I\'m using MSVC 2010)

#include 

        
10条回答
  •  囚心锁ツ
    2020-11-27 16:22

    is cstring - http://www.cplusplus.com/reference/clibrary/cstring/

    is the c++ string class - http://www.cplusplus.com/reference/string/

    Edit per Nicol Bolas comment below and a bit of googling:

    will usually import the same things as but into the std namespace. will usually import everything into the global namespace. It appears to depend on the library implementation you're using though according to my googling.

    Personally I only ever use if I need C style string helpers.

提交回复
热议问题