| Blue Shell (15) | |||
|
Hi guys, hows your morning? I hopes its good! Im a little confused on file input and output. I have a textbook which shows a simple output to a file. I modified it slightly to my own liking.
Bob is not my real name :) Anyways, this books pretty old, published in 1995. I realize you change <fstream.h> to <fstream> and the book also had a void type for main (). I also changed the A: to a C: since I do not have a ready floppy disk. However my main issue is that I'm having trouble with ifstream and file_out. I understand that ifstream is a class, and file_out is its object, but what is in the parenthesis and the path, the thing which creates the file. Also, is file_out old? Can you change it? Is there a new way? the books not very clear here, and I'm so fuzzled! xD A clear explanation would be sincerely helpful. Thanks! Cheers! Ignore to tags in the title. I tried to make it bold, but it failed epicly... | |||
|
Last edited on
|
|||
| fg109 (131) | |
| I think it should be ofstream instead of ifstream. You can name file_out to whatever you want. | |
|
|
|