看板 b96902HW 關於我們 聯絡資訊
我把答案丟到批改娘時出現了一些問題... In file included from /usr/include/stdio.h:833, from source.c:2: /usr/include/bits/stdio.h: In function `sort': /usr/include/bits/stdio.h:35: error: nested function `vprintf' declared `extern' /usr/include/bits/stdio.h:42: error: nested function `getchar' declared `extern' /usr/include/bits/stdio.h:67: error: nested function `putchar' declared `extern' 請問 vprintf getchar putchar這些東西 要怎麼與我們sort的function相連結呢? (我以為只要key_table 和 sorted_array就可以了) 還有 測資所放的數目是不一定的嗎? 測資中的數字是否會有0呢?? 請強者or助教回答 3Q!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.240.12
chhsiao:你的 #include <stdio.h> 放錯地方了 orz 11/06 21:38
chhsiao:請放外面 11/06 21:39
chhsiao:而且沒用 NULL 就不用 include stdio.h 了 11/06 21:39
greenoyster:每筆測資會有幾個數字和會怎麼分配都是不固定的 11/06 21:47
champavalon:那任一個array的數字中會有兩個0以上嗎?? 11/06 21:50
s90413k64:我想只有最後一個是0 11/06 22:18
greenoyster:測資中的數字有沒有0應該不會影響到解法的喔 11/07 00:27
olala7846:不太懂,不是要教function?為何還要寫include<stdio.h> 11/07 00:48
greenoyster:如果你要用到 "NULL" 這個東西 就要include 11/07 13:50
greenoyster:否則 compile 的時候會編不過~ 11/07 13:51