fork download
  1. int main(void)
  2. {
  3. auto fact = [&](int n) -> double { return (n > 1)? n * fact(n-1): 1; };
  4. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In lambda function:
prog.cpp:3:68: error: '((const main()::<lambda(int)>*)this)->main()::<lambda(int)>::fact' cannot be used as a function
prog.cpp: In function 'int main()':
prog.cpp:3:74: error: variable 'auto fact' with 'auto' type used in its own initializer
stdout
Standard output is empty