Advertisement
Lazerate

Virtual

Apr 13th, 2021
1,096
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. class X {
  4.  
  5. public:
  6.  virtual void foo() = 0;
  7. };
  8.  
  9. void X::foo() {
  10.  
  11.  std::cout << "X::foo()";
  12. }
  13.  
  14. class C : public X {
  15.  
  16. };
  17.  
  18. int main(int argc, char *argv[])
  19. {
  20.  C c;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement