error C2065: 'null' : undeclared identifier,该如何处理

error C2065: 'null' : undeclared identifier
C语言中指针不能赋值为null吗?还有我下面的这一段程序哪里错了?为什么会造成内存访问的错误!

struct   list
{
int     data;
struct   head_list   *next;
struct   head_list   *previous;
};

int   _tmain(int   argc,   _TCHAR*   argv[])
{
struct   list   *h;
hl   ->   data   =   2;
hl   ->   next   =   0;
hl   ->   previous   =   0;
return   0;
}

------解决方案--------------------
C语言中指针:空指针在c里面的定义是NULL
------解决方案--------------------
没问题。 完全可以赋值为0。

只是你的变量声明h和你使用的hl不一样。
------解决方案--------------------
struct list *h; //没有为h分配有效的内存
------解决方案--------------------
你定义的h是个指针,它指向谁?内存都没分配,肯定会出错哦
------解决方案--------------------
探讨
C语言中指针不能赋值为null吗?还有我下面的这一段程序哪里错了?为什么会造成内存访问的错误!

struct list
{
int data;
struct head_list *next; //------------
struct head_list *previous; //-------------
};

int _tmain(int argc, _TCHAR* argv[])
{……

------解决方案--------------------
探讨
C语言中指针:空指针在c里面的定义是NULL

------解决方案--------------------
struct list *h; 
这里要申请分配内存:
struct list *h=(struct list *)malloc(sizeof(struct list));
------解决方案--------------------
list* l;
怎么又出来个lh。你没有位l分配空间,不能直接访问成员变量。
指针NULL不是null
------解决方案--------------------
哇喔 修改下在2楼的回复:
这个h是个未定义的指针。
应该分配真实空间。用malloc 或者 new.

------解决方案--------------------
#inlcude<stdio.h>

NULL //大写在那个点h中定义的,

看看你包没包.h,看看是不是大写
------解决方案--------------------
struct head_list 

int data; 
struct head_list *next; 
struct head_list *previous; 
}; 

int _tmain(int argc, char* argv[]) 

struct head_list h; 
h . data = 2; 
h . next = 0; 
h . previous = 0; 
return 0; 
}

你的指针没空间
------解决方案--------------------
基本问题哈
------解决方案--------------------
指针使用前,先初始化。
NULL不是null。。