Chapter 12 (Page 17 through 19)
Purpose: This assignment provides experience with memory mapped files.
Create (use any editor) a text file with a couple sentences in it. Call the file mmap.txt.
Write a program that opens and memory maps that file. Then the program should repeat the following steps 3 times:
- ask the user which position in the file they want to change.
- ask the user what the new letter is for that position.
- modify the file (using the memory map).
Then the file should be unmapped and closed.
Examine the file (use any editor) and make sure the changes occurred.
Demo: Your mmap program. The instructor will test different inputs.
Reviews
There are no reviews yet.