#153616 - Rajveer - Wed Apr 02, 2008 10:02 pm
How do I create a new line if I'm writing to a file with fprintf? \n doesn't work and I can't find anything on Google (the file gets written but without the new lines).
Last edited by Rajveer on Wed Apr 02, 2008 10:50 pm; edited 1 time in total
Code: |
FILE *file_Pointer;
file_Pointer = fopen(/game_Directory/settings.ini,"w"); fprintf(file_Pointer,"[KEYS]\n"); fprintf(file_Pointer,"\n"); fprintf(file_Pointer,"KEY_A %d\n", playerKeys.A); fprintf(file_Pointer,"KEY_B %d\n", playerKeys.B); ... fclose(file_Pointer); |
Last edited by Rajveer on Wed Apr 02, 2008 10:50 pm; edited 1 time in total