Is it necessary to use reinterpret_cast< char*> when reading from a binary file. Since I found that a explicit typecast worked as well e.g. (char*), sizeof(int).
Is it necessary to use reinterpret_cast< char*> when reading from a binary file. Since
Share
both reinterpret_cast and the C-style explicit cast do exactly the same thing in your context. I prefer reinterpret_cast as it makes the nastiness more explicit when reading the code.