Hi.
This is my code:
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
ofstream file ("afile.txt");
file << "This is a line.\n";
file << "This is another line.\n";
return 0;
}
This is what the contents of afile.txt look like:
This is a line.This is another line.
Does anyone know why the new lines aren't being written?
Thanks for any help.