blob: c8e2cdc1d5c63085bea385e4b18aa42a66a29492 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#include <iostream>
#include <iterator>
/*
*
* 6.23
*
*
*/
void printint(const int i) {
std::cout << i << std::endl;
}
void print1(const int *cbeg, const int *cend) {
while(cbeg != cend) {
std::cout << *cbeg++ << std::endl;
}
}
void print2(const int arr[], const size_t size) {
for(size_t i = 0 ; i != size ; i++) {
std::cout << arr[i] << std::endl;
}
}
int main () {
int i = 0;
int j[2] = {0, 1};
printint(i);
printint(10);
print1(std::cbegin(j), std::cend(j));
print2(j, std::cend(j) - std::cbegin(j));
return 0;
}
|