问题如下: 我定义了一个结构体和一个数组: unsigned int buf[256]={......}; //省略号代表里面的内容
typedef struct{ unsigned int head; unsigned int name; unsigned int version; }PACKED S_FORMAT, *PS_FORMAT;
再定义两个指针: unsigned int *ps; PS_FORMAT *ptr;
然后进行操作: ps=buf; ptr->head = ps; ptr->name = ps+1 ptr->version = ps+2;
编译的时候总是warning:assignment makes integer from pointer without a cast. 请问这是什么原因?该如何修改?
我感觉好像是类型不匹配什么的?
|