int **array(int rows, int cols)
{
int **arr;
int i;
arr = (int **)malloc(sizeof(int*) * rows);
for (i = 0; i < rows; i++)
arr[i] = (int *)malloc(sizeof(int) * cols);
return arr;
}
int형 크기와 주소 크기는 항상 같지 않단다.
int **array(int rows, int cols)
{
int **arr;
int i;
arr = (int **)malloc(sizeof(int*) * rows);
for (i = 0; i < rows; i++)
arr[i] = (int *)malloc(sizeof(int) * cols);
return arr;
}
int형 크기와 주소 크기는 항상 같지 않단다.
int*로 int 주소크기 넣어준거 맞아?
ㅇㅇ
주소값 길이는 size_t 로 사용하셈