#include
#include
#include
#include
#include
using namespace std;
Int _tmain (int arg c, _TCHAR * argv [])
{
Ofstream outFile;
OutFile. Open (" D: \ \ myfile CSV ", the ios: : in);
if(! OutFile) {
OutFile. Open (" D: \ \ myfile CSV ", the ios: : out);
OutFile & lt; <"Name" & lt; <", "& lt; <"Age" & lt; <", "& lt; <"Height" & lt;
}
The else {
OutFile. Close ();
OutFile. Open (" D: \ \ myfile CSV ", the ios: : out | ios: : ate | ios: : app);
OutFile & lt; <"Tom" & lt; <", "& lt; <21 & lt; <", "& lt; <172.8 & lt;
}
return 0;
}
File does not exist, if performs, file creation is successful, but I can't write data
, help to see where the problem, thank you