Possible Duplicate:
C++ When should we prefer to use a two chained static_cast over reinterpret_cast
Which is better?
static_cast<T *>(static_cast<void *>(buffer));
or
reinterpret_cast<T *>(buffer);
Where buffer
is char *
(memory chunk which contains values of type T
).