The 1st printf in the original post (
fprintf(txtFile, "%s", "\n"); ) should work too. The simplest way in C style is
fputc('\n',txtFile) .
Apropos,
out_file << "\nHello, World";
out_file.close();
makes ill-formed text file where the last line is not terminated by line separator...
Last edited by ArkM; Nov 7th, 2008 at 1:21 pm.
Reputation Points: 1234
Solved Threads: 347
Postaholic
Offline 2,001 posts
since Jul 2008