when a core dump occurs ?
Karl Meiser
koala at ddsw1.UUCP
Tue Jun 28 08:18:22 AEST 1988
Usually its errors that cant be checked by the compiler, such as missing
or incorrect arguments, examples:
main()
{
long x;
printf("%s"); /* Missing argument */
printf("%d",x); /* Should be descriptor for long, %d is for ints */
}
Usually i find myself doing fprintf's without the file descriptor;
main()
{
FILE *fp;
fp = fopen("foo","r");
fprintf("Hello file named foo\n");
/* Should be
fprintf(fp,"Hello file named foo\n");
*/
fclose(fp);
}
Hope this helps.
--
Karl Meiser koala at _d_d_s_w_1
koala at m-net
koala at chinet
koala at igloo
More information about the Comp.lang.c
mailing list