In the preceding section’s bullet on stream objects, we listed several header files. Each of these header files encapsulates a section of the overall C++ stream architecture. All these files come together with each other to give the complete I/O support provided by C++. Each of these files completes its specific task to give C++ the most diverse I/O functionality of any programming language. The purpose of each of the headers is as follows:
With the exception of the ios_base class, each template class has a specialization class for characters. Figure shows the most commonly used template classes and their character specialization classes. However, this is not a complete list because several of the stream classes are beyond the scope of this book.
The class contained within each header file and the classes from which they are derived.Terms in bold represent header files, and terms without bold represent classes. The lines that link the classes indicate from which classes each class is inherited.
The ios_base Class
The ios_base class contains the byte storage common to all streams and the methods that are not dependent on template parameters. This byte storage stores the bytes that are being input and output until they reach their final destination. The several data types contained within the ios_base class provide the basis for controlling streams.
The following list outlines the purpose of several data types that can be used to control streams:
In addition, you can use several methods provided by the ios_base and in its derived classes (all other stream classes). Here they are in alphabetical order:
Much more could be written about the ios_base class. However, to keep this book interesting and within its intended page count, we decided to focus on applying streams to their most common uses.
C++ Related Interview Questions
|DBMS Interview Questions||C++ Interview Questions|
|C#. NET Interview Questions||Core Java Interview Questions|
|Data Structures Interview Questions||C & Data Structures Interview Questions|
|ADO.Net Interview Questions||Java Interview Questions|
|Go (programming language) Interview Questions||F Sharp (programming language) Interview Questions|
|C preprocessor Interview Questions||R Programming language Interview Questions|
|D Programming Language Interview Questions||Embedded C Interview Questions|
Starting The Journey Of C++
Descending Deeper¡-into Variables
Taking Command With Control Statements
Fighting With Oop
Moving To Advanced Data Types
Using Streams And Files
Errors And Exception Handling
Programming With Windows
Creating The Pirate Adventure
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.