There is a POSIX way to use memory as a FILE
descriptor: fmemopen
or open_memstream
, depending on the semantics you want: Difference between fmemopen and open_memstream
More Related Contents:
- Should a class be thread-safe? [closed]
- ifstream* Segmentation fault [closed]
- A short C++ program about the pointer
- I upgraded C++ projects from Visual Studio 2010 to 2015 still its showing Visual Studio (2010)
- How to access a local variable from a different function using pointers?
- Why pass by const reference instead of by value?
- ‘printf’ vs. ‘cout’ in C++
- Are vectors passed to functions by value or by reference in C++
- Is a return statement mandatory for C++ functions that do not return void?
- How do you use CreateThread for functions which are class members?
- Inheritance and templates in C++ – why are inherited members invisible?
- Why do functions need to be declared before they are used?
- What’s the most reliable way to prohibit a copy constructor in C++?
- Proper way to create unique_ptr that holds an allocated array
- Downcasting shared_ptr to shared_ptr?
- Does C++ contain the entire C language? [duplicate]
- Issue with cin when spaces are inputted, using string class
- How to make cout behave as in binary mode?
- Difference between std::system_clock and std::steady_clock?
- Why use !! when converting int to bool?
- Why is there no 2-byte float and does an implementation already exist?
- Use Visual Studio 2012 and compile with older platform toolset?
- C++: how to get fprintf results as a std::string w/o sprintf
- Mock non-virtual method C++ (gmock)
- Why am I able to make a function call using an invalid class pointer
- Hashtable in C++?
- std::this_thread::sleep_for() and GCC
- How to initialize all tuple elements by the same arguments?
- How to execute another exe from a C++ program in Windows
- How do I get crtdbg.h file?