void definirPolygone(struct point tabPoints[], int nbP) { int i; for (i = 0; i<nbP;i++) tabPoints[i] = definirPoint() ; } void afficherPolygone(struct point tabPoints[], int nbP) { int i; for (i = 0; i<nbP;i++) afficherPoint(tabPoints[i]) ; } void deplacerPolygone(struct point tabPoints[], int nbP, int dx, int dy) { int i; for (i=0; i<nbP; i++) deplacerPoint(&tabPoints[i], dx, dy); } int main(void) { struct point tab[12]; definirPolygone(tab,6); afficherPolygone(tab,6); deplacerPolygone(tab,6,20,100); return (0);} |