ofstream stream_file; stream_file.open("test", ios_base::out|ios_base::binary|ios_base::app);
stream_file.write((char*)pdata+12, ilen-12); stream_file.flush(); stream_file.close();