Reputation: 8531
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).
Upvotes: 0
Views: 404
Reputation: 7466
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.
Upvotes: 1