Programmation en C++

Bonjour,
je veux faire une méthode "fonction" a laquelle je donne x et y
elle doit me rendre un pointeur qui pointe à la position x,y que j ai donne dans la matrice.
est ce q il ya qq qui peut m'aider.
merci
Configuration: Windows Vista
Firefox 3.0.10

1 réponse

  1. Contributeur
    Salut,

    int *pointeur(int mat[][NB_COL], const int x, const int y) {
           if (x>=0 && x<NB_LIG) return NULL;
           if (y>=0 && y<NB_COL) return NULL;
    
           return &mat[x][y];
    }
    


    Cdlt
    0
    1. merci pour l'aide
      j vais l' essayer merci
      0