Problème d'initialisation d'un tableau
Bonjour,
à la compilation d'un programme, j'obtiens ce message
Code:
1 2 3
| graphe.c: In function main:
graphe.c:350: attention : accolades manquantes autour de l'initialisation
graphe.c:350: attention : (near initialization for tabCouple[0].duoIP) |
La structure t_couple est la suivante :
Code:
1 2 3
| typedef struct {
char *duoIP[2];
} t_couple; |
et voici mon initialisation : c'est l'endroit qui pose problème
Code:
1 2 3 4 5 6 7 8 9 10 11
| t_couple tabCouple[]={
{"192.168.0.1", "192.168.0.2"},
{"192.168.0.1", "192.168.0.4"},
{"192.168.0.2", "192.168.0.3"},
{"192.168.0.2", "192.168.0.4"},
{"192.168.0.3", "192.168.0.4"},
{"192.168.0.4", "192.168.0.5"},
{"192.168.0.5", "192.168.0.2"},
{"192.168.0.6", "192.168.0.5"},
{NULL, NULL}
}; |