About
Contact
QtCreator
KDevelop
Solarized
1
2
#include
<iostream>
3
4
5
6
int
next
() {
7
static
int
i
=
0
;
8
std::
cout
<<
"incrementing "
<<
i
<<
std::
endl
;
9
return
++
i
;
10
}
11
12
int
main
() {
13
int
i
=
0
;
14
while
(
i
<
5
)
15
i
=
next
();
16
return
0
;
17
}
18