I'm using Visual Studio 2005 on Windows XP. I'm trying to compile a C program. I'm down to one error. When I try to compile the following, I get the error:
initmol.c(20) : error C2065: 'NULL' : undeclared identifier
Here's the code. It errors out on the IF statement:
initmol.c(20) : error C2065: 'NULL' : undeclared identifier
Here's the code. It errors out on the IF statement:
Code:
#include <malloc.h>
#include "molecule.h"
MOLECULE *InitMol( void )
{
MOLECULE *m;
if ( (m = (MOLECULE *)malloc( sizeof( *m ) )) == NULL ) {
return( NULL );
}
m->N_Hydro = -1;
m->N_Atoms = 0;
m->N_Bonds = 0;
m->N_Comps = 0;
return( m );
}