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
/
person.cpp
blob
c0cac61b6190e370225776aaeeb436c187c2519c
1
#include
"person.h"
2
3
int
Person
::
count
=
0
;
4
5
bool
Person
::
set_idade
(
int
value
)
6
{
7
if
(
value
<
1
||
value
>
100
)
8
return false
;
9
10
idade
=
value
;
11
return true
;
12
}
13
14
int
Person
::
get_idade
(
void
)
15
{
16
return
idade
;
17
}
18
19
int
Person
::
get_count
(
void
)
20
{
21
return
count
;
22
}
23
24
Person
::
Person
(
void
)
25
{
26
idade
=
0
;
27
count
++;
28
}
29
30
Person
::~
Person
(
void
)
31
{
32
count
--;
33
}