All pastes #2108586 Raw Edit

Someone

public text v1 · immutable
#2108586 ·published 2012-02-01 10:15 UTC
rendered paste body
#include <iostream>
#include <string>

using namespace std;

class A {
public:
	A(){}

	void say_hello(){
		cout << "Hello, I`m A" << endl;
	}
};

class B:A {
public:
	B():A(){}

	void say_hello(){
		cout << "Hello, I`m B" << endl;
	}
};

int main() {
	A obj1;
	B obj2;

	obj1.say_hello();
	obj2.say_hello();

	return 0;
}