質問編集履歴
1
エラーメッセージを追加しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -94,4 +94,52 @@
|
|
94
94
|
|
95
95
|
}
|
96
96
|
```
|
97
|
-
```
|
97
|
+
```
|
98
|
+
エラーメッセージ
|
99
|
+
In file included from cpgm/distance.c:4:0:
|
100
|
+
cpgm/queue.h: In function ‘init_queue’:
|
101
|
+
cpgm/queue.h:8:39: error: incompatible type for argument 1 of ‘calloc’
|
102
|
+
queue->nodes_ptr = (Node **) calloc(n, sizeof(N
|
103
|
+
^
|
104
|
+
In file included from cpgm/distance.c:2:0:
|
105
|
+
/usr/include/stdlib.h:468:14: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘Node {aka struct <anonymous>}’
|
106
|
+
extern void *calloc (size_t __nmemb, size_t __s
|
107
|
+
^
|
108
|
+
In file included from cpgm/distance.c:4:0:
|
109
|
+
cpgm/queue.h: In function ‘enq’:
|
110
|
+
cpgm/queue.h:14:8: error: invalid type argument of ‘->’ (have ‘Queue {aka struct <anonymous>}’)
|
111
|
+
queue->arr[queue->last++] = input;
|
112
|
+
^
|
113
|
+
cpgm/queue.h:14:19: error: invalid type argument of ‘->’ (have ‘Queue {aka struct <anonymous>}’)
|
114
|
+
queue->arr[queue->last++] = input;
|
115
|
+
^
|
116
|
+
cpgm/queue.h:14:31: error: ‘input’ undeclared (first use in this function)
|
117
|
+
queue->arr[queue->last++] = input;
|
118
|
+
^
|
119
|
+
cpgm/queue.h:14:31: note: each undeclared identifier is reported only once for each function it appears in
|
120
|
+
cpgm/queue.h: In function ‘deq’:
|
121
|
+
cpgm/queue.h:18:3: error: unknown type name ‘nodes_ptr’
|
122
|
+
nodes_ptr output = queue->arr[queue->first++]
|
123
|
+
^
|
124
|
+
cpgm/queue.h:18:27: error: ‘Queue {aka struct <anonymous>}’ has no member named ‘arr’
|
125
|
+
nodes_ptr output = queue->arr[queue->first++]
|
126
|
+
^
|
127
|
+
cpgm/distance.c: In function ‘init_value’:
|
128
|
+
cpgm/distance.c:15:22: error: incompatible type for argument 2 of ‘init_queue’
|
129
|
+
init_queue(&queue, N);
|
130
|
+
^
|
131
|
+
In file included from cpgm/distance.c:4:0:
|
132
|
+
cpgm/queue.h:7:6: note: expected ‘Node {aka struct <anonymous>}’ but argument is of type ‘int’
|
133
|
+
void init_queue(Queue *queue, Node n){
|
134
|
+
^
|
135
|
+
cpgm/distance.c: At top level:
|
136
|
+
cpgm/distance.c:18:20: error: expected declaration specifiers or ‘...’ before ‘nodes_ptr’
|
137
|
+
void calc_distance(nodes_ptr origin){
|
138
|
+
^
|
139
|
+
cpgm/distance.c: In function ‘print_distance’:
|
140
|
+
cpgm/distance.c:63:30: error: subscripted value is neither array nor pointer nor vector
|
141
|
+
fprintf(fp, "%s ", name[hashM[d][j]]);
|
142
|
+
^
|
143
|
+
cpgm/distance.c: In function ‘main’:
|
144
|
+
cpgm/distance.c:74:14: warning: implicit declaration of function ‘calc_distance’ [-Wimplicit-function-declaration]
|
145
|
+
int maxD = calc_distance(origin);
|