[問題] I/O in C
想要在一個用fopen打開的檔案中
插入一行字
比如說 原本的檔案長這樣
first line
second line
@
lastline
想要在@前面加入一行 third line, i.e.
first line
second line
third line
@
lastline
有沒有除了全部讀到buffer裏面 再重新寫入之外的方法哩
因為那樣就不能處理很大的檔案了...
--
It is a hard matter, my fellow citizens, to argue with the belly,
since it has no ears.
-- Marcus Porcius Cato
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.109.176.56
推
11/28 16:12, , 1F
11/28 16:12, 1F
推
11/28 16:14, , 2F
11/28 16:14, 2F
→
11/28 16:14, , 3F
11/28 16:14, 3F
→
11/29 00:17, , 4F
11/29 00:17, 4F
→
11/29 00:18, , 5F
11/29 00:18, 5F
推
11/29 21:40, , 6F
11/29 21:40, 6F
討論串 (同標題文章)
LinuxDev 近期熱門文章
PTT數位生活區 即時熱門文章
15
25