The following is a functions that writes a line to a diagnostic file...
The file opens correctly, but nothing prints into it. the fprintf statement returns -1, but I've double checked the fopen and it succeeds...Code:void Write_to_Diagnostic_Log(const char * const Log_String, const char * const sDiagnostic_Log_Path) { FILE *fpDiagnostic_Log; // Pointer to the Diagnostic Log File fpDiagnostic_Log = fopen(sDiagnostic_Log_Path, "a"); if (fpDiagnostic_Log == NULL) printf("\n\n%s\n\n", sDiagnostic_Log_Path); fprintf(fpDiagnostic_Log, "%s", Log_String); fclose(fpDiagnostic_Log); }
What gives?



LinkBack URL
About LinkBacks


