#include <iostream>
#include <fstream>
using namespace std;
int main()
{
fstream st; // Step 1: Creating object of fstream class
st.open("/home/Rohan/cpp.txt",ios::out); // Step 2: Creating new file
st.close(); // Step 4: Closing file
return 0;
}
#include <fstream>
using namespace std;
int main()
{
fstream st; // Step 1: Creating object of fstream class
st.open("/home/Rohan/cpp.txt",ios::out); // Step 2: Creating new file
st.close(); // Step 4: Closing file
return 0;
}