[問題] 請問怎麼在副程式中用fprintf
怎麼樣在副程式中也可以使用fprintf
我在int main中有宣告了
FILE *input = fopen(argv[1], "r");
FILE *output = fopen(argv[2], "w");
然後在副程式中用
fprintf(output, "%d ", x->key);
我compile會出現
output undeclared(未宣告)
--
推
01/08 20:41,
01/08 20:41
推
01/08 20:44,
01/08 20:44
推
01/08 20:44,
01/08 20:44
→
01/08 20:45,
01/08 20:45
→
01/08 20:45,
01/08 20:45
→
01/08 20:45,
01/08 20:45
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.134.48.111
→
05/26 23:23, , 1F
05/26 23:23, 1F
→
05/26 23:24, , 2F
05/26 23:24, 2F
※ 編輯: fenir 來自: 220.134.48.111 (05/26 23:26)
→
05/26 23:24, , 3F
05/26 23:24, 3F
→
05/26 23:25, , 4F
05/26 23:25, 4F
→
05/26 23:27, , 5F
05/26 23:27, 5F
→
05/26 23:27, , 6F
05/26 23:27, 6F