The C++ I/O System

Since the beginning of this book you have been using the C++ I/O system, but you have been doing so without much formal explanation. Since the I/O system is based upon a hierarchy of classes, it was not possible to present its theory and details without first discussing classes and inheritance. Now it is time to examine the C++ I/O system in detail. The C++ I/O system is quite large, and it won’t be possible to discuss here every class, function, or feature, but this module will introduce you to the most important and commonly used parts. Specifically, it shows. | Module 11 The C I O System Table of Contents CRITICAL SKILL Understand I O CRITICAL SKILL Know the I O class CRITICAL SKILL Overload the and CRITICAL SKILL Format I O by using iso member CRITICAL SKILL Format I O by using CRITICAL SKILL Create your own CRITICAL SKILL Open and close CRITICAL SKILL Read and write text CRITICAL SKILL Read and write binary CRITICAL SKILL Know additional file CRITICAL SKILL Use randon access files I CRITICAL SKILL Check I O system Since the beginning of this book you have been using the C I O system but you have been doing so without much formal explanation. Since the I O system is based upon a hierarchy of classes it was not possible to present its theory and details without first discussing classes and inheritance. Now it is time to examine the C I O system in detail. The C I O system is quite large and it won t be possible to discuss here every class function or feature but this module will introduce you to the most important and commonly used parts. Specifically it shows how to overload the and operators so that you can input or output objects of classes that you design. It describes how to format output and how to use I O manipulators. The module ends by discussing file I O. Old vs. Modern C I O There are currently two versions of the C object-oriented I O library in use the older one that is based upon the original specifications for C and the newer one defined by Standard C . The old I O library is supported by the header file . The new I O library is supported by the header 1 C A Beginner s Guide by Herbert Schildt iostream . For the most part the two libraries appear the same to the programmer. This is because the new I O library is in essence simply an updated and improved version of the old one. In fact the vast majority

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.