No. There are two methods(from what I know, might be wrong):
1 2
ofstream mystream;
mystream.open("file");
And the better:
ofstream mystream("file");
The i/o/fstream classes have constructors that automatically open the file which have the same parameters as the open() fucntion so you can do it like the above.