Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我在保存到文件时看到了周围的样本。但我想知道是否可以保存到 char* 或字符串而不是文件中 - 可以说将它保存在内存中?
似乎没有任何东西可以促进这一点。所有 I/O 似乎都基于提供文件名。
但是,这里似乎有一个名为的扩展,io_new它具有基于流的 I/O。
io_new
有关示例,请参见此处的文档(搜索“Reading And Writing In-Memory Buffers”)。