fstream input("test1.docx", ios::in | ios::binary);
uint8_t * buffer = new uint8_t;
vector<uint8_t> arr; //vector to save value of file
fstream output("test2.docx", ios::out | ios::binary);
while (input.good())
{
input.read((char*)(buffer), 1);
arr.push_back((*buffer));
}
After doing this, i have a vector of values. Can i build a new file "test2.docx" from this vector? This new file will be exactly the same as the old file "test1.docx"