Why don't the std::fstream classes take a std::string?

后端 未结 10 787
花落未央
花落未央 2020-11-28 07:25

This isn\'t a design question, really, though it may seem like it. (Well, okay, it\'s kind of a design question). What I\'m wondering is why the C++ std::fstream

10条回答
  •  自闭症患者
    2020-11-28 07:33

    Is there any class in STL that takes a string... I dont think so (couldnt find any in my quick search). So it's probably some design decision, that no class in STL should be dependent on any other STL class (that is not directly needed for functionality).

提交回复
热议问题