-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathToFunction1.cpp
43 lines (37 loc) · 933 Bytes
/
ToFunction1.cpp
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
40
41
42
43
/**
* \file ToFunction1.cpp
* \brief
*/
#include <StdStream/StdStream.h>
#include <StdTest/StdTest.h>
//-------------------------------------------------------------------------------------------------
typedef int aiIntArray[3][4];
aiIntArray a
{
{4, 6, 8, 10},
{14, 16, 18, 20},
{24, 26, 28, 30}
};
//-------------------------------------------------------------------------------------------------
void
show(
const aiIntArray &a,
int m,
int n
)
{
for (int i = 0; i < m; ++ i) {
for (int j = 0; j < n; ++ j) {
int x = *(*(a + i) + j);
std::cout << x << ", ";
}
std::cout << std::endl;
}
}
//-------------------------------------------------------------------------------------------------
int main ()
{
show(a, 3, 4);
return 0;
}
//-------------------------------------------------------------------------------------------------