I woud like to ask why i have to use &buffer instead of just buffer, why I am passing adress to reinterpret cast or type conversion. Thanks.
DWORD buffer;
std::ifstream openFile("xxxxx",std::ios::in|std::ios::binary);
std::ofstream writeFile("xxxxx",std::ios::out|std::ios::binary);
while(!openFile.eof())
{
openFile.read(reinterpret_cast<char*>(&buffer),sizeof(DWORD));
writeFile.write((char *)&buffer,sizeof(DWORD));
}