Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/12/2010, 18:37
Avatar de Munire
Munire
 
Fecha de Ingreso: julio-2010
Ubicación: en el ciberdespacio (España)
Mensajes: 150
Antigüedad: 13 años, 10 meses
Puntos: 4
Respuesta: Problema complejo de arrays bidimensionales y punteros

el problema lo tendras al pasarlo por funcion

aqui te dejo el codigo de como se hace

Código C:
Ver original
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void iguala5(int matriz[5][5]);
  5.  
  6. int main()
  7. {
  8.     int matrix[5][5];
  9.     //(*(*(matrix+1)+1))=5;
  10.  
  11.     iguala5(matrix);
  12.  
  13.     printf("valor [1][1] es: %d\n", matrix[1][1]);
  14.  
  15.     system("pause");
  16.     return 0;
  17. }
  18.  
  19.  
  20. void iguala5(int matriz[5][5])
  21. {
  22.     (*(*(matriz+1)+1))=5;
  23. }