Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. int main() {
  2.     int x,y;
  3.     tpMatriz* matriz = NULL;
  4.     char a = 'a', b = 'b', c = 'c', d = 'd';
  5.     char* conteudo[4] = {&a, &b, &c, &d};
  6.     char valor;
  7.     MAT_CriarMatriz(&matriz, 4);
  8.     for(y = 0; y < 4; y++) {
  9.         for(x = 0; x < 4; x++) {
  10.             MAT_InsereNo(x, y, matriz, conteudo);
  11.         }
  12.     }
  13.  
  14.     for(x = 0; x < 16; x++) {
  15.         printf("x: %d, y: %d\n", matriz->NosMatriz[x]->coordenadaX, matriz->NosMatriz[x]->coordenadaY);
  16.     }
  17.  
  18.     MAT_ObterValorCorr(matriz, &valor);
  19.     printf("%c %d \n", valor, valor);
  20.     MAT_DestruirMatriz(matriz);
  21.     system("pause");
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement