#include <iostream> #include <fstream> std::ofstream outfile( fileName); outfile << "some contents of the file" << std::endl; outfile.close();