c++ STL cout source code

一笑奈何 提交于 2019-12-06 07:11:05
Alan Stokes

cout is not part of the STL, so you won't find the source for cout in the STL source.

You probably want to look for the source for your C++ standard library, which was based on the STL, but also contains iostreams. Where that is depends on what platform you're using.

Fred Foo

If you happen to be using GCC, then libstdc++ is your C++ library. Its sources can be found on gcc.gnu.org. cout is defined on line 58 of src/c++98/globals_io.cc.

std::cout is not a function, it is a instance of std::ostream (interface description) that is tied to standard output.

If you are using gcc/libstdc++, have a blast browsing its source code online

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!