fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int a;
  5. int* b;
  6. int main()
  7. {
  8. int d = 7;
  9. b = &d;
  10. a = (int)b;
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:10:11: error: cast from ‘int*’ to ‘int’ loses precision [-fpermissive]
  a = (int)b;
           ^
stdout
Standard output is empty