Stuff
public cpp v1 · immutable#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;}