Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problemas com Linguagem C
Message
De
30/05/2003 12:05:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00794447
Message ID:
00794561
Vues:
12
>Preciso trabalhar com uma matriz e não sei como.
>Por exemplo:
>
>
>int n=3;
>int matriz;
>
>for (a=0; a<n; a++)
>  for (b=0; b<n; b++)
>    matriz[a][b] = 0;
>
>
>Agora ele da erro matriz[a][b] pois não sei como eu faço pra expecificar coluna e linha de uma matriz em C.
>
>Valeu!!

Acho que precissa declarar a matriz com as dimensões corretas. Troque a instrução:
int matriz;
por a seguinte:
int matriz[3][3];
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform