function pointer :
typedef (* fun)(int x, int y)
#parama once
$parama hdrstop
#parama package(smart_init)
const int *p; int const * p;// These two form have the same meaning. They both mean a pointer point to constant.
int * const p; //This mean the constant pointer, but the variable it points to can change.
alloc
malloc(NumberOfElement,*ByteOfOneElement))
calloc(NumberOfElement, ByteOfOneElement)
If a 2D array need to be allocated, we should write that
if ( (recon = (double **)calloc(np->base_num, sizeof(double *)) ) == NULL)
printf("Could not allocate recon");
else
printf("recon ALLOCATED\n");
for (i=0; i<np->base_num; i++)
{
if ( (recon[i] = (double *)calloc(size_recon, sizeof(double)) ) == NULL)
printf("Could not allocate recon_i");
else
printf("recon_i ALLOCATED\n");
}