-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
84 lines (69 loc) · 1.68 KB
/
main.cpp
File metadata and controls
84 lines (69 loc) · 1.68 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include <stdio.h>
#include <stdlib.h>
#include "Tools.h"
#include <windows.h>
//todo : https://www.cyberforum.ru/cpp-beginners/thread2709026.html ðåøèòü ýòó ïðîáëåìó äîáàâèòü âîçìîæíîñòü ðàçíîñèòü øàáëîíû íà îñíîâå tpp(íî ýòî íå òî÷íî)
int main()
{
Rect_Array2d<float> test;
Rect_Array3d<float> test1;
test1.height = 3;
test1.widht = 4;
test1.depth = 5;
test.height = 3;
test.widht = 4;
test.map = _Rect_Malloc_2d<float>(test.height, test.widht);
test1.map = _Rect_Malloc_3d<float>(test1.height, test1.widht, test1.depth);
//_Rect_Free_2d(test);
//_Rect_Free_3d(test1);
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 4; j++)
{
test.map[i][j] = (float)(i);
printf("%g ", test.map[i][j]);
}
printf("\n");
}
printf("\n\n\n");
for(int i=0;i<5;i++)
{
for(int j=0;j<3;j++)
{
for(int k=0;k<4;k++)
{
test1.map[i][j][k]=(float)i;
printf("%g ",test1.map[i][j][k]);
}
printf("\n");
}
printf("\n");
}
Sleep(1000);
system("cls");
printf("Code %lu\n",_Rect_ResizeCol3d(100,&test1,true));
for(int i=0;i<5;i++)
{
for(int j=0;j<4;j++)
{
for(int k=0;k<25;k++)
{
test1.map[i][j][k]=(float)i;
printf("%g ",test1.map[i][j][k]);
}
printf("\n");
}
printf("\n");
}
_Rect_Free_2d(test);
_Rect_Free_3d(test1);
/*
int* gg = (int*)malloc(sizeof(int) * 10);
free(gg);
for (int i = 0; i < 10; i++)
{
gg[i] = i;
printf("%d\n", gg[i]);
}
*ß õç ÷å çà õåðíÿ ÿ íî âî÷åìó òî äàæå òóò íå âñåãäà âûäàåò îøèáêó è âûâîäÿòñÿ äàííûå*/
}