处理文件时,首选以下两个例子中的哪一个?一个人提供比另一个更好的表现吗?有什么不同吗?
ifstream input("input_file.txt");
ofstream output("output_file.txt");
Run Code Online (Sandbox Code Playgroud)
VS
fstream input("input_file.txt",istream::in);
fstream output("output_file.txt",ostream::out);
Run Code Online (Sandbox Code Playgroud)