C++ Programming

Write a C++ Program to Create a File

Write a C++ Program to Create a File

Source Code

#include<fstream>

#include<iostream>

using namespace std;

int main()

{

    ofstream outf("myfile.txt");

    outf<<"This is my first file handling program"<<endl;

    outf<<endl<<"This much for now"<<endl;

    outf.close();

}
Back to top button