如何使用WinAPI写入和读取数组到文件

How to write and read array to file using WinAPI?

本文关键字:读取 数组 文件 何使用 WinAPI      更新时间:2023-10-16

我有int* arr = new int[n]

我怎么能写它的文件list.datWinAPI ?我写完后怎么读?upd: checkout my code: http://pastebin.com/eeMVk8JA

嗯,这取决于你是在寻找类似于序列化的东西,还是你只是想用WinAPI模拟标准的C/c++文件操作。

假设是后者,看看WinAPI文件操作函数:http://msdn.microsoft.com/en-us/library/windows/desktop/aa364232 (v = vs.85) . aspx