fork download
  1. #include <iostream>
  2. using namespace std;
  3. struct S
  4. {
  5. int x;
  6. struct S k;
  7. };
  8.  
  9. int main() {
  10. // your code goes here
  11. struct S s;
  12. s.x=10;
  13. return 0;
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:6:11: error: field ‘k’ has incomplete type ‘S’
  struct S k;
           ^
prog.cpp:3:8: note: definition of ‘struct S’ is not complete until the closing brace
 struct S
        ^
stdout
Standard output is empty