PDA

View Full Version : Windows newline



indifference
29th August 2007, 00:55
Hello all,

I'm programming on Linux, and I want to be able to choose the end of line, for example in windows is used "\r\n" and on linux is used "\n".

I've tried to replace all the newline characters to "\r\n" but with no luck.

Thanks!

momesana
29th August 2007, 01:34
Declare a variable and use #ifndef #define to set the variable to the desired newline character after checking for the operating system you are using. Also look at http://doc.trolltech.com/4.3/qchar.html#SpecialCharacter-enum ... (QChar::LineSeparator) since it might be of interest to you.