All pastes #22272 Raw Edit

Something

public cpp v1 · immutable
#22272 ·published 2005-09-07 05:13 UTC
rendered paste body
#include <iostream>#include <string>using namespace std;class father{protected:	char *name;public:	father(const char *nom)	{		strcpy(name,nom);	}	char *GetName() { return name; }	virtual void print() { cout<<"Father "<<nombre<<endl; }};class son: public padre{public:	son() : father("Son") {}	void print() { cout<<"Not defined"<<endl; }};*/int main(){	father P("J Ruiz");	P.print();	cout<<P.GetName()<<endl;	return 0;}