Difference between and ?

前端 未结 10 1038
囚心锁ツ
囚心锁ツ 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:29

    contains C-library string functions. strlen, strcmp, etc.

    contains the definition for std::basic_string, which has the typedefs std::string and std::wstring. That's the difference.

    They really have no relationship at all, outside of the fact that they both deal with strings.

提交回复
热议问题