New line while writing to a file?

03 Dec 2010

Hi,

how can I make "fprintf" print in sequential lines of my output file?

When doing this ...

    fprintf(fp, "Hello fun SD Card World!\n\r");
    fprintf(fp, "Hello fun SD Card World!\n\r");

... I get this ...

Hello fun SD Card World!Hello fun SD Card World!

... when looking at a .txt file with windows' notepad. 

03 Dec 2010

You should use \r\n for Windows-style endlines.

03 Dec 2010

Thanks a lot! That was it :)

Christoph

 

25 Apr 2013

Last year I wrote this program script, it was part of computer class assignment , however i took help from http://www.papersdom.com/papers/assignment.asp , they assist me very well about Script. You can also take help from Forum members also.