repo.or.cz
/
lcapit-junk-code.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Introduce TinyHttp server
[lcapit-junk-code.git]
/
object-counter
/
cpp
/
main.cpp
blob
f16be438dba32552f35073acb7e0d833a749db06
1
#include <iostream>
2
#include
"person.h"
3
4
using namespace
std
;
5
6
void
show_obj_count
(
void
)
7
{
8
cout
<<
"-> Object count "
;
9
cout
<<
Person
::
get_count
();
10
cout
<<
"
\n
"
;
11
}
12
13
int
main
(
void
)
14
{
15
const int
max
=
12
;
16
Person
*
p
[
max
];
17
18
show_obj_count
();
19
20
for
(
int
i
=
0
;
i
<
max
;
i
++)
21
p
[
i
] =
new
Person
();
22
23
show_obj_count
();
24
25
for
(
int
i
=
0
;
i
<
max
;
i
++)
26
delete
p
[
i
];
27
28
show_obj_count
();
29
30
return
0
;
31
}