tailieunhanh - Lecture Practical C++ programming - Chapter 16: File Input/Output

We are now ready to explore how to read and write files. About half of this chapter is devoted to explaining some of the I/O functions and classes. This chapter by no means covers all the things that one can do with a file. It is designed to give the student a good base, but leaves out things like advanced formatting and random access. | Chapter - 16 File Input Output Practical C Programming Copyright 2003 O Reilly and Associates Page 1 I O Packages There are 3 different I O packages available to the C programmer The C streams package. This package is used for most I O. The unbuffered I O package. Used primarily for large file I O and other special operations. The C stdio package. Many older C-- programs use this package. A C-- program is a C program that has been updated to compile with a C compiler but uses none of the new features of the new language. This package is useful for some special operations. Practical C Programming Copyright 2003 O Reilly and Associates Page 2 C I O C provides four standard class variables for standard I O. Variable Use std cin Console in standard input std cout Console output standard output std cerr Console error standard error std clog Console log Normally std cin reads from the keyboard and std cout cerr and clog go to the screen. Most operating systems allow I O redirection my_prog my_prog Practical C Programming Copyright 2003 O Reilly and Associates Page

crossorigin="anonymous">
Đã 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.