07-08-2005, 23:23
|
|
|
חבר מתאריך: 09.05.05
הודעות: 303
|
|
מה לא טוב בקוד הזה
#include <stdio.h>
main()
{
int a;
printf ("1.open for read only\r\n");
printf ("2.open for write(what in the file deleted)\r\n");
printf ("3.open for append\r\n");
scanf ("%d", &a);
if (a == 2)
{
FILE *f;
f = fopen ("me.txt" , "wt");
if (f = NULL)
{
printf("shit");
exit(1);
}
fprintf( f , "%d", a);
fclose(f);
}
}
אני לא מוצא בעיה בקוד ומרות זאת הוא לא עובד לי
|