Coders Packet

Creating And Writing to a file in C++

By Raman Kishore Singh

This code is in c++ that creates a new file. Also, we can write to the created file in this code.

In this project, I have written a code in c++ which creates any type of file you want. Also, you can write anything to the created file in this code.

Software Requirements:

Dev C++

How to use:

In the code after ofstream create a file name which we can use in the code and after that in the bracket () we can create any type of file by writing a name with a "." extension the type of file you want.

After creating a file we can write anything inside the file using the name which we used after ofstream. Use the "<<" operator after file name to write to a file.

Download Complete Code


No comments yet