Ciao a tutti,
il mio problema è il seguente ho una struct:
typedef struct
{
double ascissa, ordinata;
}tipopunto;
un array:
tipopunto *arr[N];
alloco un blocco di struct:
arr =(malloc(N * sizeof(tipopunto));
e mi dava il seguente errore:
incompatible types in assignment of `void*' to `tipopunto*[4]'
giustamente il MALLOC ritorna un puntatore ad un VOID e allora ho fatto nel seguente modo:
arr =(struct *)malloc(N * sizeof(tipopunto));
però adesso mi da:
expected primary-expression before "struct"
Quale è il mio errore...?Grazie mille a tutti!!!