C++ Tutorials | L73: Stream Input Output Classes And Objects In C++ | cout | cin | The Easy Concepts

preview_player
Показать описание
#programming #cplusplusprogramming #cprogramming #competitiveprogramming #placementpreparation #streamclasses
C++ Tutorials | L73: Stream Input Output Classes And Objects In C++ | The Easy Concepts

In this tutorial, we have discussed the concept of input-output basics in C++.
The C++ standard libraries provide an extensive set of input/output capabilities. C++ uses type-safe I/O which means that each IO operation is executed in a manner sensitive to the data type. The stream insertion and stream extraction operators are overloaded to accept data items of specific types. If unexpected data is processed, various error bits are set, which the user may test to determine whether an IO operation is succeeded or failed.

C++ I/O occurs in streams, which are a sequence of bytes. In input operations, the bytes flow from a device (keyboard, disk drive, network, etc.) to the main memory. In output operations, bytes flow from main memory to a device (display screen, printer, disk drive, network, etc.)
An application associates meaning with bytes – the bytes could represent characters, raw data, graphics images, digital speech, digital video, or any other information an application may require. The system I/O mechanisms should transfer bytes from devices to memory (and vice versa)
consistently and reliably.

C++ Provides low level and High-level I/O -

Low-Level IO – unformatted IO, individual byte is the item of interest, high-speed, high-volume transfers but not convenient.

High-Level IO – formatted IO, bytes are grouped into meaningful units such as integers, strings, user-defined types, etc., satisfactory for most I/O other than high volume file processing (use unformatted Io for this).
Unformatted IO could lead to portability issues because it's not portable across all platforms.

Other things that are discussed in the tutorial are -
1. Classic Stream Vs Standard Streams
2. Iostream Library Headers
3. Stream Input/Output Classes and Objects
4. Stream IO Template Hierarchy and Operator Overloading
5. File Processing Templates

Please watch the full video to learn the concepts in more detail.

Learn Computer Science Concepts in an Easy Way !!

Рекомендации по теме
join shbcf.ru