看板 Programming 關於我們 聯絡資訊
int efs_open (const char *path, int oflag, ...); 今天看到有人的function是這樣宣告的↑ 因為是第一次看到有人在function的參數中用... 對於這種用法感到很好奇,可是看了function的內容又看不太出個所以然 所以想請教大家,這裡使用...有什麼特別的目的嗎?它的用法又是...? 覺得很神奇為什麼這樣compile也能過@@a p.s. 我用的compiler是Visual C++ 2005 感謝.. -- 圖畫裡,龍不吟,虎不嘯,小小書僮可笑可笑 棋盤裡,車無輪,馬無韁,叫聲將軍提防提防 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.211.243.146
ddavid:像printf,它的參數個數是會變動的,就用 118.167.0.46 07/04 18:56
ddavid:得上。 118.167.0.46 07/04 18:56
dendrobium:Variable-length argument 61.31.135.26 07/04 19:11
Aioria:感謝:p118.165.123.160 07/05 00:08