int func(int arr[100][150], int rows, int columns);
int func(int arr[100][150], int rows, int columns)
{
//stuff here
}
This function works. What should I do if I would like to assign arr size to arr[rows][columns], but not 100 and 150 all the time? If I assign it to 100 and 150 it probably uses more memory than it should if rows and colums are smaller?
int func(int arr[rows][columns], int rows, int columns);
int func(int arr[rows][columns], int rows, int columns)
{
//stuff here
}
or
int func(int arr[][], int rows, int columns);
int func(int arr[][], int rows, int columns)
{
//stuff here
}
doesn't work.