摘要
C++语言引入了一个抽象概念流来实现数据的输入输出,提供了功能强大的插入(<<)和提取(>>)运算符。与C语言文件的输入输出相比,流运算具有很多优点。但流运算符也有其先天缺陷,本文首先给出了一个缺陷的表现,然后对此缺陷形成的原因进行了详细的分析。
Stream is an important concept of (C++), it provides two operators (<< and >>) to extract data from an input stream or put data into an output stream. Comparing with file of C language, it has a lot of advantages. In fact, stream operators also have disadvantages. In this paper, we discussed a pitfall of stream operators, and analyzed the reason of the pitfall formation.
出处
《金陵科技学院学报》
2004年第4期1-2,11,共3页
Journal of Jinling Institute of Technology
关键词
C++
流
运算符重载
(C++)
stream
operator overload