fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct compound_type {
  5. int member;
  6. };
  7.  
  8. void func()
  9. {
  10. compound_type foo {384};
  11. int bar = reinterpret_cast<int&>(foo);
  12. std::cout << bar << std::endl;
  13. }
  14.  
  15. int main()
  16. {
  17. func();
  18. return 0;
  19. }
Success #stdin #stdout 0s 4760KB
stdin
Standard input is empty
stdout
384