12345678
vector<unsigned char> bufferType; ofstream textout (pathname.c_str(), ios::out | ios::binary); { textout.write((const char*)&bufferType[0], bufferType.size()); } textout.close();
12345678910111213141516171819202122
#include <iostream> #include <fstream> #include <string> using namespace std; int main() { vector<unsigned char> bufferType; bufferType.push_back('e'); bufferType.push_back('P'); bufferType.push_back('R'); bufferType.push_back('f'); string pathname("output.bin"); ofstream textout(pathname.c_str(), ios::out | ios::binary); textout.write((const char*)&bufferType[0], bufferType.size()); textout.close(); }
50656652
ePRf