Non ho capito cosa intendi ...

Hai incluso stdlib.h ? Hai fatto le modifiche che ti ho suggerito ?