reinterpret_cast?

hi,
is it possible to use reinterpret_cast operator on "non class" objects
both pointers and non-pointers.
if so what kind of operations may be useful to do?

I'm asking this for practice purposes.

thanks.


EDIT:

for example:

1
2
3
4
5
	
void* a;
int* b = new int(4);
a = reinterpret_cast<void*>(b);  //convert to void*
cout << *reinterpret_cast<int*>(a);  //conver back 


how will I do that to convert for example an int to double?
(by not going into how usefol this is)
Last edited on
reinterpret_cast is just like the casts found in C language, so yes, it is possible.
Topic archived. No new replies allowed.