fork download
  1. #include <iostream>
  2. using namespace std;
  3. class Foo
  4. {
  5. public:
  6. Foo();
  7. };
  8.  
  9. Foo::Foo(){ Bar b;}
  10. class Bar{};
  11.  
  12. int main() {
  13. // your code goes here
  14. return 0;
  15. }
Compilation error #stdin compilation error #stdout 0s 15232KB
stdin
Standard input is empty
compilation info
prog.cpp: In constructor ‘Foo::Foo()’:
prog.cpp:9:13: error: ‘Bar’ was not declared in this scope
 Foo::Foo(){ Bar b;}
             ^~~
stdout
Standard output is empty