Advertisement
Josif_tepe

Untitled

Apr 27th, 2021
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Zivotno {
  5. public:
  6.    
  7.     void print_name(char *c) {
  8.         cout << c << endl;
  9.     }
  10.     void f(int x, int y) {
  11.         cout << x << " " << y << endl;
  12.     }
  13. };
  14. class Kuce : public Zivotno {
  15. public:
  16.     void f(int x) {
  17.         cout << x << endl;
  18.     }
  19. };
  20. int main() {
  21.     Kuce k;
  22.     k.Zivotno::f(1, 2);
  23.     k.f(1);
  24.     return 0;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement