Why is there a different string class in every C++ platform out there?

前端 未结 7 2068
北荒
北荒 2020-12-31 08:02

While I like programming in C++, I hate the idea of:
std::basic_string vs QString vs wxString vs .............
Doesn\'t the

7条回答
  •  太阳男子
    2020-12-31 08:36

    The reason for multiple string classes is that the C++ standard was finalized fairly late (in 1998); it then took some time until all systems actually provided a correct C++ library. By that time, all these competing string classes where already written.

    In addition, in some cases, people want to inherit from a single base class, which std::string wouldn't do.

提交回复
热议问题