Mega Code Archive
Categories
/
C++
/
Class
Need reinterpret_cast to go from pointer to int and from int to pointer
class X {}; class Y {}; int main(int argc, char** argv) { int i = 3; X x; Y y; X* xp; Y* yp; i = reinterpret_cast
(xp); xp = reinterpret_cast
(i); return (0); }