Introduce TinyHttp server
[lcapit-junk-code.git] / object-counter / cpp / main.cpp
blobf16be438dba32552f35073acb7e0d833a749db06
1 #include <iostream>
2 #include "person.h"
4 using namespace std;
6 void show_obj_count(void)
8 cout << "-> Object count ";
9 cout << Person::get_count();
10 cout << "\n";
13 int main(void)
15 const int max = 12;
16 Person *p[max];
18 show_obj_count();
20 for (int i = 0; i < max; i++)
21 p[i] = new Person();
23 show_obj_count();
25 for (int i = 0; i < max; i++)
26 delete p[i];
28 show_obj_count();
30 return 0;