TW
Size: a a a
TW
LD
int lenght;
int *ptr, **array;
lenght = sizeof(int*) * width + sizeof(int) * width * height;
array = (int**)malloc(lenght);
ptr = (int*)(array + width);
for(int iIndex = 0; iIndex < width; iIndx++)
array[iIndex] = (ptr + width * iIndex);
Все, с этим прекрасно можно работать, как:for(iIndex)
for(jIndex)
array[iIndex][jIndex] = <do smthg>
SH
int lenght;
int *ptr, **array;
lenght = sizeof(int*) * width + sizeof(int) * width * height;
array = (int**)malloc(lenght);
ptr = (int*)(array + width);
for(int iIndex = 0; iIndex < width; iIndx++)
array[iIndex] = (ptr + width * iIndex);
Все, с этим прекрасно можно работать, как:for(iIndex)
for(jIndex)
array[iIndex][jIndex] = <do smthg>
LD
SH
SH
int lenght = 0;...
LD
int lenght = 0;...
SH
LD
SH
SH
LD
LD
SH
LD
SH
LD
LD
S
TW
int lenght;
int *ptr, **array;
lenght = sizeof(int*) * width + sizeof(int) * width * height;
array = (int**)malloc(lenght);
ptr = (int*)(array + width);
for(int iIndex = 0; iIndex < width; iIndx++)
array[iIndex] = (ptr + width * iIndex);
Все, с этим прекрасно можно работать, как:for(iIndex)
for(jIndex)
array[iIndex][jIndex] = <do smthg>