Hi, im trying to write a bunch of strings into a text file which are received through the com port.
every so often though the program gives a fatal error and i get a dialog box which go's something like
it points to line 56 of fprintf.c and says that an "assertion failure" was caused.
str != NULL
i think it might be because its trying to write a string when it hasnt received anything.
im using the code below to write my strings into the file
i have modified it so it doesnt continue when it cant write the string so my new code looks like
howver, its still giving me the same error after a few hours
if((fprintf(fp, "\n") || fprintf( fp,"%s", decoded)) == EOF)
printf("No string/String error");
Could someone tell me what the error is and what i might be doing wrong?
VC++ , windows XP