Answers for "how to make a file for c++ program"

C++
1

create file c++

// using ofstream constructors.
#include <iostream>
#include <fstream>  

std::ofstream outfile ("test.txt");

outfile << "my text here!" << std::endl;

outfile.close();
Posted by: Guest on January-01-2021

Code answers related to "how to make a file for c++ program"

Browse Popular Code Answers by Language