Write a C++ Program to Create a File

Write a C++ Program to Create a File
- C++ – Type Conversion and Ways of Typecasting
- C++ – Class and Object With Syntax
- C++ – OOP Introduction Characteristics and Approach
- C++ Take Input Name, Class, and Roll Number from User and Display
- Write a C++ Program to Read 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(); }