1 // Wiederverwendung von Code
  2 // mainperv.cpp
  3
  4 #include <stdio.h>
  5 #include "personv.hpp"
  6
  7 char puffer[100];
  8 PersonV Ich("Egon","Müller",21,2,1952,’m’);
  9
 10 int main ()
 11 {
 12 printf("\x1b[2J!");      // Bildschirm löschen
 13 Ich.ZeigNamen(puffer);
 14 printf ("\nMein Name ist %s", puffer);
 15 Ich.GibGebTag(puffer);
 16 printf ("\nMein Geburtstag: %s",puffer);
 17 return 0;
 18 }

Bild 12-10: Hauptprogramm für die abgeleitete Klasse