I need to work in my app with memory buffer like with direct access files. Is exists analogues for fread and fwrite functions? C++
I have buffer in memory with data. I want: read data, write data and move pointer in this buffer. Like files but with memory and without files.
I think you mean memory mapped files. It is not supported by the C++ standard, but Boost has a portable implementation here.
Basically, it allows you to access the file through a pointer. The OS will take care of caching and, in general, it is quite efficient.