fork(1) download
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. int main()
  5. {
  6. char x[6] = {0};
  7. int y = 0x48656c6c6f;
  8. int y2 = 0x656c6c6f;
  9.  
  10. std::cout << (y == y2) << std::endl;
  11.  
  12. error;
  13.  
  14. std::memcpy(x, &y, sizeof y);
  15.  
  16. for (char c : x)
  17. std::cout << c;
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:7:13: warning: overflow in implicit constant conversion [-Woverflow]
prog.cpp:12:5: error: ‘error’ was not declared in this scope
stdout
Standard output is empty