- 0
- 0
- 约7.36千字
- 约 27页
- 2021-11-30 发布于安徽
- 举报
* Manipulating File Pointers To move the pointer to some specific location? Examples of Random Access Program 11.7: The program uses the “STOCK.DAT” file created using Program 11.6 for five items It performs the following operations on the file. Adds a new item to the file. Modifies the details of an item. Displays the contents of the file * Example 11.7 * §11.5 Error Handling During File Operations Possible errors: A file to open for reading does not exist. An invalid file name. The file name used for a new file may already exist. An invalid operation such as reading past the end-of-file. An operation when the file is not opened for the purpose. No any space in the disk for storing more data. * Testing Stream States State functions To check the state of the I/O stream * Error Handling During File Operations Example: A Summary Concepts File streams File pointers Basic operations on file Open and close Detect end-of-file File open modes Sequential input and output Random access Error Handling During File Operations * Review Questions Null. * Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved. 013225445X Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved. 013225445X Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved. 013225445X Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved. 013225445X Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved. 013225445X Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved. 013225445X Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved. 013225445X Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved. 013225445X Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved. 013225
原创力文档

文档评论(0)