rendered paste body#include <iostream>using namespace std;class Person{ public: Person(string s) :name (s) { cout << "Anzahl Personen: " << ++anzahl << endl; } ~Person() { cout << "Anzahl Personee: " << --anzahl << endl; } void hallo() const { cout << "Hallo, hier ist " << name << endl; } static int anzahl; string name;}; int Person::anzahl = 0; int main(){ Person foo("foo"), bar("bar"); cout << Person::anzahl << endl; foo.hallo(); bar.hallo();}/* Ausgabe Anzahl Personen: 1 Anzahl Personen: 2 2 Anzahl Personen: 1 Anzahl Personen: 0*/