An Easier Way to Write and Read to Files Try compiling this method for writing a file. I got this from an excellent book, Instant C++ Programming, by Ian Wilks. [easy write] And here's the file for reading a file: [easy read] Note that you can just as easily have the file created in a different file folder or even to disk. If you want to save to disk, you type: ("a:\\thing.txt") Assignment Run the first example and then modify the names of the files. Add comments to explain what is occuring with the program. |