Ecco! stavo avendo dei problemi in fase di compilazione, non so lavorare bene con i puntatori a stringa "senza array".
ho questa funzione:
dove nel main ho dichiaratocodice:int route (packet pac, entry table[], char *router){ address s_address; int i =0, FOUND = 1; s_address = network(pac.dest); // ritorna una struct di tipo address do{ if (table[i].network_num.first == s_address.first && table[i].network_num.second == s_address.second && table[i].network_num.third == s_address.third){ FOUND = 0; *router = table[i].next_hop; //ERRORE } else *router ="default"; //ERRORE i++; }while (FOUND && i<MAXENTRY); return FOUND; }, come faccio a inserire una stringa in router?codice:char *router


Rispondi quotando