Sehr seltsam, diese Fehlerkombination.
Was kriegst du denn vom malloc zurück ? -1 ? oder 0 ?
(ev. printf einbauen)
Schau im Help nach. Vielleicht braucht die Schweinebacke irgendeine Heap-Initialisierung. mfg robert

Hopperla: im malloc(anzahl * sizeof(xx)) fehl mir das pt->

soll so ausschauen malloc(pt->anzahl * sizeof.....)

wenn anzahl = 0, weil er gar nicht "deine" anzahl in der structure nimmt.
kriegst du natürlich auch nix (---> printf von pt->anzahl zu Kontrolle)