C++ | Herencia | Pregunta 11
#include<iostream> using namespace std; class Base { public : int x, y; public: Base(int i, int j){ x = i; y = j; } }; class Derived : public Base { public: Derived(int i, int j):x(i), y(j) {} void print() {cout << x <<» «<< y; } }; int main(void) { Derived … Continue reading «C++ | Herencia | Pregunta 11»