fork(1) download
  1.  
  2. struct Foo
  3. {
  4. //struct Bar {}; // COOL
  5.  
  6. Bar bar() const;
  7.  
  8. struct Bar {}; // NOT COOL
  9.  
  10. };
  11.  
  12. Foo::Bar Foo::bar() const { return Bar(); }
  13.  
  14. int main() {
  15. // your code goes here
  16. return 0;
  17. }
Compilation error #stdin compilation error #stdout 0s 3292KB
stdin
Standard input is empty
compilation info
prog.cpp:6:3: error: ‘Bar’ does not name a type
   Bar bar() const;
   ^
prog.cpp:12:21: error: no ‘Foo::Bar Foo::bar() const’ member function declared in class ‘Foo’
 Foo::Bar Foo::bar() const { return Bar(); }
                     ^
stdout
Standard output is empty