Using std::fstream one can declare objects of both the types ifstream and ofstream. The only difference is that, with fstream we need to provide in, out, app as a parameter which may not always require for other two.
Is there anything special about ifstream,ofstream which cannot be accomplished with fstream or just a coding convenience ?