CodeClerks

Opening Files Using open() in C++



Write the reason you're deleting this FAQ

Opening Files Using open() in C++

The function open() can be used to open multiple files that use the same stream object. For example, we may want to process a set of files sequentially. In such cases, we may create single stream object and use it to open each file in turn.



// Creating files with open() function

#include
#include

int main()
{
   ofstream fout;      // create output stream
   fout.open(“country”);   // connect “country” to it

   fout

Comments

Please login or sign up to leave a comment

Join