When dealing with files, which of the two examples below is preferred? Does one provide better performance than the other? Is there any difference at all?
ifstream input("input_file.txt");
ofstream output("output_file.txt");
vs
fstream input("input_file.txt",istream::in);
fstream output("output_file.txt",ostream::out);