質問するログイン新規登録

回答編集履歴

1

修正

2016/10/07 15:53

投稿

A.Ichi
A.Ichi

スコア4070

answer CHANGED
@@ -22,11 +22,11 @@
22
22
  printf("\n %s can not be opened\n",filename);
23
23
  exit(1);
24
24
  }
25
- if( NULL ==(filepointer2=fopen(filename2,"a")))
25
+ if( NULL ==(filepointer2=fopen(filename2,"w")))
26
- {
26
+ {
27
- printf("\n %s cannot be opened \n",filename2);
27
+ printf("\n %s cannot be opened \n",filename2);
28
- exit(1);
28
+ exit(1);
29
- }
29
+ }
30
30
 
31
31
  for(i=0; i<3; i++)
32
32
  {