Allora ho una struttura che supponiamo si chiami STRUTT e la assegno così
Così funziona tutto correttamente, quello che vorrei è che le due righe:codice:int main() { STRUTT **miaVar = NULL; int N = 0; funzioneEsterna(&miaStrutt, &N); miaStrutt[0]->campo1 = "xyz"; miaStrutt[0]->campo2 = "123"; } int funzioneEsterna(STRUTT ***Elem, int *N) { allocaMemoria(Elem, N); }
possano essere scritte tramite la funzione funzioneEsterna() e non nel main, come posso fare? Tutti i miei tentativi mi danno errore.codice:miaStrutt[0]->campo1 = "xyz"; miaStrutt[0]->campo2 = "123";
Grazie è importante!![]()

Rispondi quotando