consider this code
T* pa = new T(13);
int address = reinterpret_cast<int>(pa);
Where T can be any built-in type.
1) I can not understand what's wrong with reinterpret cast here ??
2) What are the cases when this kind of casting will lead to an undefined behavour ?
3) Will pa
always contain the correct decimal representation of a memory address ?