回答編集履歴

1

追記

2016/08/05 10:25

投稿

Chironian
Chironian

スコア23272

test CHANGED
@@ -5,3 +5,87 @@
5
5
  恐らく、printf文の前に「全角」の空白文字があります。
6
6
 
7
7
  「半角」の空白文字へ置き換えれば消えると思います。
8
+
9
+
10
+
11
+ ---
12
+
13
+ 【追記】
14
+
15
+ 取り敢えず、下記にてビルドして実行しても落ちなくなりました。
16
+
17
+ 変更箇所にマークしましたので、何が問題だったのか良く考えてみてください。
18
+
19
+ ```C
20
+
21
+ #include <stdio.h> // ここ
22
+
23
+ #include <string.h>
24
+
25
+
26
+
27
+ struct student {
28
+
29
+ int year; /* 学年 */
30
+
31
+ int clas; /* クラス */
32
+
33
+ int number; /* 出席番号 */
34
+
35
+ char name[64]; /* 名前 */
36
+
37
+ double stature; /* 身長 */
38
+
39
+ double weight; /* 体重 */
40
+
41
+ };
42
+
43
+
44
+
45
+ void student_print(struct/*←ここ*/ student data[],int count);
46
+
47
+
48
+
49
+ int main(void)
50
+
51
+ {
52
+
53
+ student data[] = { 1,2,3,"A",12.3,45.6};
54
+
55
+ student_print(/*ここ*/data,/*ここ*/ 1/*←ここ*/);
56
+
57
+ return 0/*←ここ*/;
58
+
59
+ }
60
+
61
+
62
+
63
+ void student_print(struct/*←ここ*/ student data[],int count)
64
+
65
+ {
66
+
67
+ int i;
68
+
69
+ for (i = 0;i < count;i++) {
70
+
71
+ printf("[学年]:%d\n",data[i].year);
72
+
73
+ printf("[クラス]:%d\n",data[i].clas);
74
+
75
+ printf("[出席番号]:%d\n",data[i].number);
76
+
77
+ printf("[名前]:%s\n",data[i].name);
78
+
79
+ printf("[身長]:%f\n",data[i].stature);
80
+
81
+ printf("[体重]:%f\n",data[i].weight);
82
+
83
+ }
84
+
85
+ return;
86
+
87
+ }
88
+
89
+ ```
90
+
91
+