fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct enclose {
  5. struct inner {
  6. void f(int i);
  7. };
  8. void inner::f(int i) {}
  9. };
  10.  
  11. int main() {
  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:8:24: error: cannot define member function 'enclose::inner::f' within 'enclose'
     void inner::f(int i) {}
                        ^
stdout
Standard output is empty