开发者

File IO tricks using c/c++

Ar开发者_Go百科e there some good books or articles about file processing with c/c++, especially when the file is very large, GB or something like that?


Not that I know of, but it's hard to imagine what issues you're concerned about, and you don't state your OS/filesystem. You should check your OS documentation to see whether the usual fopen() et al are already or have 64 bit versions, your compiler docs for any command line switches or issues with std::fstream support of large files. You should also consider memory mapping the files, and - to ensure the operating system supports you as well as possible with unnecessary adverse affect on other processes - whether it accepts any hints from your application about the style of access you plan to do on the file (i.e. random access vs sequential access).

So, from these three approaches: fopen et all, fstream, mmap - write a little program and test each... it'll take you a few hours and you'll learn a lot.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜