Error de compilación de Malloc: no se puede utilizar un valor de tipo "int" para inicializar una entidad de tipo int (*) [30]
Debo haber intentado 20 formas de hacer esto ahora. Realmente necesito ayuda, no importa lo que haga, recibo un error similar a este.
a value of type "int" cannot be used to initialize an entity of type "int (*)[30]"
es decir, esto me dará tal error
int(*array)[160] = malloc((sizeof *array) * 10);
y haciendo algo como esto
int** Make2DintArray(int arraySizeX, int arraySizeY) {
int** theArray;
theArray = (int**) malloc(arraySizeX*sizeof(int*));
int i;
for (i = 0; i < arraySizeX; i++)
{
theArray[i] = (int*) malloc(arraySizeY*sizeof(int));
}
return theArray;
}
me conseguirá esto
"void *(size_t)" in "memory.c" at line 239 and: "int()"
¿Alguien tiene una solución sobre cómo asignar con éxito un 2dArray de int [160] [10]