I'm having problems in creating files with fstream.
The following code piece creates the "change.vi" file, but doesn't create "file.txt".
In brief,I can create files with ofstream but not with fstream. What am I missing?
You're not missing anything. Since input from a newly created file is not possible, if you try to open a non existent file with an input flag the operation fails.