debug assertion fail
Posted
by
Kolt
on Stack Overflow
See other posts from Stack Overflow
or by Kolt
Published on 2012-04-07T05:06:58Z
Indexed on
2012/04/07
5:30 UTC
Read the original article
Hit count: 128
I have a program that runs correctly if I start it manually. However, if I try to add a registry key to start it automatically during startup, I get this error:
Debug assertion failed (str!=null) fprintf.c line:55
I tried to add Sleep(20000) before anything hapens, but same error.
here`s the code:
main()
{
FILE* filetowrite;
filetowrite = fopen("textfile.txt", "a+");
writefunction(filetowrite);
}
int writefunction(FILE* filetowrite) {
fprintf(filetowrite, "%s", "\n\n");
...
}
I also tried with passing filename as char* and opening it in wrtiefunction(), but same error.
© Stack Overflow or respective owner