如果有的话,iostream和STL之间有什么关系 [英] What is the relationship, if any, between iostream and the STL

查看:140
本文介绍了如果有的话,iostream和STL之间有什么关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人问过iostream

和STL之间的关系,如果有的话。我怀疑是iostream使用了STL提供的一些

功能,但是我没有真正知道

,这是我怀疑的基础。有人知道吗?请让你尽可能详细地回答



谢谢,


Bob

解决方案



blangela写道:


有人问过我iostream

和STL之间的关系是什么,如果有的话。我怀疑是iostream使用了STL提供的一些

功能,但是我没有真正知道

,这是我怀疑的基础。有人知道吗?请尽可能详细地给你

回答。



STL是第三方图书馆被带入标准的

库。它在某种程度上表现出来并与某些概念一起使用

当时在编译器库中并不存在(我不相信

有一个标准)。当STL成为标准的一部分时,实现库中的部分库变为更好地与STL中的

概念一起工作。这包括添加的字符串

迭代器和iostreams我相信 - 再次,迭代器添加。


现在人们说STL的日子它们通常意味着

标准库的C ++部分(换句话说不是C compat crap),其中iostreams

当然是其中的一部分。恕我直言,这个词应该被贬低但是

无论如何。


blangela写道:


某人



谁?您在学校或您的面试官的指导员?


告诉我

iostream和STL之间的关系是什么。我怀疑是iostream使用了STL提供的一些

功能,但是我没有真正知道

,这是我怀疑的基础。有人知道吗?



当然,图书馆的实施者知道的最多。


请让你

回答尽可能详细。



首先,''iostream''是标准库的一部分。如果通过STL获得
你的意思是标准图书馆,这是你的关系。

我不是说只是为了让你失望,从某种意义上来说,重要的是

设计意图溪流背后的哲学与图书馆的其他部分一致。


流以两种主要方式融入图书馆的其他部分:它们

定义(重载)运算符用于输入和输出类型定义

库中的库(std :: basic_string,一个),并且它们还提供

用于某些库算法的迭代器。此外,在流和区域设置之间有一定的链接(可以这么说)。


流是否可以使用库的任何其他部分<幕后的
是未指定的。他们可以使用标准C库提供的流功能

。至于排序,搜索,复制

和其他算法,我不明白为什么不。分配器和其他

内存管理的东西。


V

-

请删除资本''A'在通过电子邮件回复时

我没有回复最热门的回复,请不要问


< blockquote>

Victor Bazarov写道:


blangela写道:


有人



谁?您在学校或您的面试官的指导员?



工作的同事问了这个问题。


告诉我

iostream和STL之间的关系是什么。我怀疑是iostream使用了STL提供的一些

功能,但是我没有真正知道

,这是我怀疑的基础。有人知道吗?



当然,图书馆的实施者知道的最多。


请让你

回答尽可能详细。



首先,''iostream''是标准库的一部分。如果通过STL获得
你的意思是标准库,



我的意思是STL的标准模板库


这是你的关系。


我不是说只是为了让你失望,从某种意义上说,重要的是

背后的设计意图和理念流与图书馆的其余部分一致。


流以两种主要方式融入图书馆的其他部分:它们

定义(重载)运算符,用于输入和输出库中定义的
(std :: basic_string,用于一个),并且它们还提供了

迭代器在一些库算法中使用。此外,在流和区域设置之间有一定的链接(可以这么说)。


流是否可以使用库的任何其他部分<幕后的
是未指定的。他们可以使用标准C库提供的流功能

。至于排序,搜索,复制

和其他算法,我不明白为什么不。分配器和其他

内存管理的东西。


V

-

请删除资本''A'在通过电子邮件回复时

我没有回复最热门的回复,请不要问


Someone has asked me what the relationship is, if any, between iostream
and the STL. My suspicion is that iostream uses some of the
functionality provided by the STL, but I have no actual kowledge on
which to base my suspicion. Anyone out there know? Please make you
answer as verbose as possible.

Thanks,

Bob

解决方案


blangela wrote:

Someone has asked me what the relationship is, if any, between iostream
and the STL. My suspicion is that iostream uses some of the
functionality provided by the STL, but I have no actual kowledge on
which to base my suspicion. Anyone out there know? Please make you
answer as verbose as possible.

The "STL" was a third party library that was brought into the standard
library. It behaved in certain ways and worked with certain concepts
not necissarily in compiler libraries at the time (I don''t believe
there was a standard). When the STL became part of the standard
library parts of the implementation library changed to better work with
concepts in the STL. This includes string to which were added
iterators, and iostreams I believe - again, iterators where added.

Now days when people say "STL" they usually mean the C++ part of the
standard library (in otherwords not the C compat crap), which iostreams
are of course part of. IMHO the term should really be depricated but
whatever.


blangela wrote:

Someone

Who? Your instructor at school or your interviewer?

has asked me what the relationship is, if any, between
iostream and the STL. My suspicion is that iostream uses some of the
functionality provided by the STL, but I have no actual kowledge on
which to base my suspicion. Anyone out there know?

Implementors of the library know the most, of course.

Please make you
answer as verbose as possible.

First and foremost, ''iostream'' is part of the Standard Library. If
by "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 sense
that the design intent and philosophy behind streams is in tune with
the rest of the library.

The streams fit into the rest of the library in two major ways: they
define (overload) operators for inputting and outputting types defined
in the library (std::basic_string, for one), and they also provide
iterators for use in some library algorithms. Also, there is a certain
link (so to speak) between streams and locales.

Whether streams make any use of any other parts of the library
behind the scenes, is unspecified. They can use stream functionality
provided by the Standard C library. As to sorting, searching, copying
and other algorithms, I don''t see why not. Allocators and other
memory management stuff as well.

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask



Victor Bazarov wrote:

blangela wrote:

Someone


Who? Your instructor at school or your interviewer?

A colleage at work asked the question.

has asked me what the relationship is, if any, between
iostream and the STL. My suspicion is that iostream uses some of the
functionality provided by the STL, but I have no actual kowledge on
which to base my suspicion. Anyone out there know?


Implementors of the library know the most, of course.

Please make you
answer as verbose as possible.


First and foremost, ''iostream'' is part of the Standard Library. If
by "STL" you mean the Standard Library,

I meant Standard Template Library by STL

here is your relationship.

I am not saying that just to wave you off, it''s important in the sense
that the design intent and philosophy behind streams is in tune with
the rest of the library.

The streams fit into the rest of the library in two major ways: they
define (overload) operators for inputting and outputting types defined
in the library (std::basic_string, for one), and they also provide
iterators for use in some library algorithms. Also, there is a certain
link (so to speak) between streams and locales.

Whether streams make any use of any other parts of the library
behind the scenes, is unspecified. They can use stream functionality
provided by the Standard C library. As to sorting, searching, copying
and other algorithms, I don''t see why not. Allocators and other
memory management stuff as well.

V
--
Please remove capital ''A''s when replying by e-mail
I do not respond to top-posted replies, please don''t ask


这篇关于如果有的话,iostream和STL之间有什么关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆