質問編集履歴

1

エラー

2019/10/30 07:26

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -24,9 +24,9 @@
24
24
 
25
25
  ### 発生している問題・エラーメッセージ
26
26
 
27
- 識別子が必要です。
28
-
29
- ')'が必要です。
27
+ c(17,44): error C2122: 'p': 引数の型に誤りあります。
28
+
29
+
30
30
 
31
31
 
32
32
 
@@ -298,7 +298,7 @@
298
298
 
299
299
  fputs(Title, fp);
300
300
 
301
- qsort(address_book, MAXPEOPLE, sizeof(struct data), compare);
301
+ qsort(p, MAXPEOPLE, sizeof(struct data), compare);
302
302
 
303
303
  int i = 0;
304
304
 
@@ -308,23 +308,23 @@
308
308
 
309
309
 
310
310
 
311
- printf("%s,%s,%s\n", address_book[count].name, address_book[count].tel, address_book[count].address);
311
+ printf("%s,%s,%s\n",p[count].name, p[count].tel, p[count].address);
312
-
312
+
313
- fprintf(fp, "%s,%s,%s\n", address_book[count].name, address_book[count].tel, address_book[count].address);
313
+ fprintf(fp, "%s,%s,%s\n", p[count].name, p[count].tel, p[count].address);
314
314
 
315
315
  }
316
316
 
317
317
  fclose(fp);
318
318
 
319
- while(address_book[count].name!='\0')
319
+ while(p[count].name!='\0')
320
-
320
+
321
- {
321
+ {
322
-
323
-
324
-
322
+
323
+
324
+
325
- printf("%s,%s,%s\n", address_book[count].name, address_book[count].tel, address_book[count].address);
325
+ printf("%s,%s,%s\n", p[count].name, p[count].tel, p[count].address);
326
-
326
+
327
- fprintf(fp, "%s,%s,%s\n", address_book[count].name, address_book[count].tel, address_book[count].address);
327
+ fprintf(fp, "%s,%s,%s\n", p[count].name, p[count].tel, p[count].address);
328
328
 
329
329
  count++;
330
330