Click here to Skip to main content
15,893,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have designed one dialogue based MFC application, in which there is condition on '\n' new line character,it executed on my desktop but it not working on other machines!I write code as given below:
C#
fprintf(fp_out,"%c",c5);
        fprintf(fp_out,"%c",c6);
        fprintf(fp_out,"%c",c7);
        fprintf(fp_out,"%c",c8);
        fprintf(fp_out,"%c",'\n');

Last line '\n' takes two bytes while executing,why it not working on others machines! is there any specific condition for that? please suggest
Thanks in advance!
Posted

1 solution

This is because on Windows '\n' is not an end-of-line character at all. Please see: http://en.wikipedia.org/wiki/End-of-line[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900