fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Test {
  5. public:
  6. virtual void foo()=0;
  7. };
  8.  
  9. struct Bar : public Test
  10. {
  11. virtual void foo() override;
  12. };
  13.  
  14. void Bar::foo()
  15. {
  16. cout << "Test!";
  17. }
  18.  
  19. int main() {
  20. Bar b;
  21. b.foo();
  22. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
Test!