ebsaith
14th June 2013, 10:15
Good Day,
I'm outputting an Array to a text file.
Output works except for the formatting of a new line!
I'm not sure if I'm missing any #include
This is what I got:
#include <stdio.h>
#include <math.h>
#include <QList>
#include <QFileDialog>
#include <QFile>
#include <fstream>
#include <iostream>
#include <iomanip>
My outputting statement:
stream << array1[m] << "\t" << array2[m] << endl;
the tab "\t" works
when I try either <<endl or "\n"
No new lines are created in text file
Any Ideas?
Thanks
Added after 1 27 minutes:
Apologies--- Was not Qt Problem
Apparently notepad does not pick up newline character when displayed!
Notepad++ displayed correctly -> #Learned colleague showed me the diff
Kind Regards
I'm outputting an Array to a text file.
Output works except for the formatting of a new line!
I'm not sure if I'm missing any #include
This is what I got:
#include <stdio.h>
#include <math.h>
#include <QList>
#include <QFileDialog>
#include <QFile>
#include <fstream>
#include <iostream>
#include <iomanip>
My outputting statement:
stream << array1[m] << "\t" << array2[m] << endl;
the tab "\t" works
when I try either <<endl or "\n"
No new lines are created in text file
Any Ideas?
Thanks
Added after 1 27 minutes:
Apologies--- Was not Qt Problem
Apparently notepad does not pick up newline character when displayed!
Notepad++ displayed correctly -> #Learned colleague showed me the diff
Kind Regards