Hi, I'm trying to make a program that will write to a file and tell it that the next time that the program is run to not do the first part of the program.

fstream install;
//this is what all of the tutorials say to do.
//this is supposed to open the file for writing and reading (this is an fstream instance so //the default is to have both)
cout << "it worked!";
cout << "fail";

when I run this, it say that: "variable ‘std::fstream install’ has initializer but incomplete type"

Does anyone have an idea?
even the program that the tutorial provided isn't running... what am I doing wrong (This process has worked before but I can't figure out where that program is...)

That's Great! I found that There were problems with almost all of the things dealing with the f/i/o stream classes...

The book that I have doesn't make a ton of sense.

Thanks, J.t.

Now I want the user to input the place of the file being read. This isn't working for just one reason: Apparently, the declaration of the fstream class isn't correct...

The declaration is just fstream ready; and then later

ready(apply,ios_base::trunc|ios_base::out);//apply is the var where I'm asking the user to put the location into.


This article has been dead for over six months. Start a new discussion instead.