#include "stdafx.h" #include <string> #include <iostream> #include <fstream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { ofstream myfile; myfile.open("C:\\example.txt", ofstream::out); //doesn't create the file and myfile.is_open() returns false myfile << "Writing this to a file.\n"; myfile.close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)