calloc() is declared in stdlib.h. You'll need to add the following line near the top of the file:
#include<stdlib.h>