如何使用WinAPI写入和读取数组到文件
How to write and read array to file using WinAPI?
我有int* arr = new int[n]
。
我怎么能写它的文件list.dat
与WinAPI
?我写完后怎么读?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
相关文章:
- 当我在 CLion 中读取数组中的 txt 文件时C++编码问题
- For 循环在尝试读取数组 c++ 时程序崩溃
- 从文件中读取数组没有给出正确的值?
- (C/C++)fscanf_s从txt文件以字符形式读取数组时缺少整数参数错误
- C++:无法读取数组中的内容
- 读取数组的第一个元素还是第 4000 个元素更快?
- 为什么并行读取数组会导致内存泄漏?
- 读取数组中每个对象的所有键值对
- C++ 从指定范围内的文件中读取数组
- MPI_Get仅从共享内存区域读取数组的第一个元素
- 如何使用指针函数编写/读取数组
- 程序仅读取数组中 6 个值中的 4 个
- ARDUINO LCD:通过读取数组生成导航菜单
- 如何从 Arduino 库中读取数组
- 尝试创建一个读取数组并打印质数的程序
- 因为每个循环都读取数组错误
- 在 Linux 上使用 Getenv 在 C++ 中读取数组环境变量
- 如何在c++中读取数组中的输入文件
- 动态设置数组大小并从文本文件中读取数组值
- 从boost::p roperty_tree读取数组显示为空白