fork download
  1. #include <iostream>
  2. #include <stdint.h>
  3.  
  4. int main() {
  5. void *ptr;
  6. int myint = 4;
  7. ptr = (void *)myint;
  8.  
  9. int myint_out = (int)ptr;
  10. std::cout << myint_out;
  11. }
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
4