本文介绍了如果有的话,iostream和STL之间有什么关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 有人问过iostream 和STL之间的关系,如果有的话。我怀疑是iostream使用了STL提供的一些 功能,但是我没有真正知道 ,这是我怀疑的基础。有人知道吗?请让你尽可能详细地回答。 谢谢, Bob 解决方案 STL是第三方图书馆被带入标准的 库。它在某种程度上表现出来并与某些概念一起使用 当时在编译器库中并不存在(我不相信 有一个标准)。当STL成为标准的一部分时,实现库中的部分库变为更好地与STL中的 概念一起工作。这包括添加的字符串 迭代器和iostreams我相信 - 再次,迭代器添加。 现在人们说STL的日子它们通常意味着 标准库的C ++部分(换句话说不是C compat crap),其中iostreams 当然是其中的一部分。恕我直言,这个词应该被贬低但是 无论如何。 谁?您在学校或您的面试官的指导员? 当然,图书馆的实施者知道的最多。 首先,''iostream''是标准库的一部分。如果通过STL获得你的意思是标准图书馆,这是你的关系。 我不是说只是为了让你失望,从某种意义上来说,重要的是 设计意图溪流背后的哲学与图书馆的其他部分一致。 流以两种主要方式融入图书馆的其他部分:它们 定义(重载)运算符用于输入和输出类型定义 库中的库(std :: basic_string,一个),并且它们还提供 用于某些库算法的迭代器。此外,在流和区域设置之间有一定的链接(可以这么说)。 流是否可以使用库的任何其他部分是未指定的。他们可以使用标准C库提供的流功能 。至于排序,搜索,复制 和其他算法,我不明白为什么不。分配器和其他 内存管理的东西。 V - 请删除资本''A'在通过电子邮件回复时 我没有回复最热门的回复,请不要问 Victor Bazarov写道: 谁?您在学校或您的面试官的指导员? 工作的同事问了这个问题。 当然,图书馆的实施者知道的最多。 首先,''iostream''是标准库的一部分。如果通过STL获得你的意思是标准库, 我的意思是STL的标准模板库 这是你的关系。 Someone has asked me what the relationship is, if any, between iostreamand the STL. My suspicion is that iostream uses some of thefunctionality provided by the STL, but I have no actual kowledge onwhich to base my suspicion. Anyone out there know? Please make youanswer as verbose as possible.Thanks,Bob 解决方案The "STL" was a third party library that was brought into the standardlibrary. It behaved in certain ways and worked with certain conceptsnot necissarily in compiler libraries at the time (I don''t believethere was a standard). When the STL became part of the standardlibrary parts of the implementation library changed to better work withconcepts in the STL. This includes string to which were addediterators, and iostreams I believe - again, iterators where added.Now days when people say "STL" they usually mean the C++ part of thestandard library (in otherwords not the C compat crap), which iostreamsare of course part of. IMHO the term should really be depricated butwhatever.Who? Your instructor at school or your interviewer?Implementors of the library know the most, of course.First and foremost, ''iostream'' is part of the Standard Library. Ifby "STL" you mean the Standard Library, here is your relationship.I am not saying that just to wave you off, it''s important in the sensethat the design intent and philosophy behind streams is in tune withthe rest of the library.The streams fit into the rest of the library in two major ways: theydefine (overload) operators for inputting and outputting types definedin the library (std::basic_string, for one), and they also provideiterators for use in some library algorithms. Also, there is a certainlink (so to speak) between streams and locales.Whether streams make any use of any other parts of the librarybehind the scenes, is unspecified. They can use stream functionalityprovided by the Standard C library. As to sorting, searching, copyingand other algorithms, I don''t see why not. Allocators and othermemory management stuff as well.V--Please remove capital ''A''s when replying by e-mailI do not respond to top-posted replies, please don''t askWho? Your instructor at school or your interviewer?A colleage at work asked the question.Implementors of the library know the most, of course.First and foremost, ''iostream'' is part of the Standard Library. Ifby "STL" you mean the Standard Library,I meant Standard Template Library by STLhere is your relationship. 这篇关于如果有的话,iostream和STL之间有什么关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-31 08:22