fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. int getVal() {
  6. return 5;
  7. }
  8.  
  9. int main() {
  10.  
  11. int *a = &(getVal());
  12. // your code goes here
  13. return 0;
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:11:21: error: lvalue required as unary ‘&’ operand
  int *a = &(getVal());
                     ^
stdout
Standard output is empty