I would like to know how can I check if a pointer is null or not,
for instance this routine:
- Code: Select all
void lif_init(Lif *ptr,float R,float C,float deltaT)
{
if(ptr!=NULL)
{
float tau=R*C;
ptr->alfa=(tau/(tau+deltaT));
ptr->beta=(R*deltaT)/(tau+deltaT);
ptr->spike=0;
ptr->u[0]=0.0;
ptr->u[1]=0.0;
ptr->Th=1.0;
}
}
is not compiling neither with NULL neither with null.
Can you give me some example?
Cheers.
