ChinaUnix.net
相关文章推荐:

提领指向不完全类型的指针

大家帮帮忙,小弟初学linux,要做课程设计,遇到一个问题: 我写linux内核模块编程的时候遇到这样一个问题,当用到指针f时,编译不通过(KDevelop编译的),报错说:提领指向不完全类型指针。不知道是为什么??? #include #include #include #include #include ...... struct files_struct *f; for_each_process(p)//p是task_struct * ...

by linuxzhao - 内核源码 - 2007-11-22 16:39:23 阅读(5015) 回复(3)

相关讨论

#include #include #include #include #include #include #include #include #include #include #define MYPORT 5000 int main(int argc,char *argv[]) { int sockfd; struct sockaddr_in their_addr; struct hosten *he; int numbytes; if(argc!=3) { fprintf(stderr,"usage :talker hostname message\n"); exit...

by Wendsia - Linux环境编程 - 2007-08-02 16:56:42 阅读(14404) 回复(20)

出现“ 提领指向不完全类型指针”这样的错误提示可能 是什么原因啊?

by i_gzj - C/C++ - 2007-11-09 19:28:24 阅读(6408) 回复(9)

#include #include #include #include #include #include #include #include #include #include const char MESSAGE[]={"hello world !\n"}; const int BACK_LOG=5; int main(int argc,char *argv[]) { int serverSocket=0,on=0,port=0,status=0,childpid=0; struct hostent *hostptr=NULL; char...

by 30003000 - C/C++ - 2008-07-19 17:52:04 阅读(10874) 回复(3)

typedef struct PushIO_Trace_record_t { int pid; char comm; int filename; long int file_pos; ssize_t data_size; int operation; unsigned long start_time; unsigned long end_time; } PushIO_Trace_record; iorec->start_time=t1;//报错提领指向不完全类型指针 iorec->pid=current->pid; iorec->comm=current->comm; iorec->file_pos=ppos; iorec->data_size=count;// 引用结构体...

by luocaizhu - C/C++ - 2013-08-22 10:14:13 阅读(3552) 回复(2)

我用gcc调试的时候,出现了“指向不完全指针”的错误,在网上搜索了一下,好像是少了头文件,请问各位高手,是少了什么头文件啊?谢谢了!

by mickey87214 - Linux环境编程 - 2007-12-10 17:48:57 阅读(1643) 回复(4)

本帖最后由 shihyu 于 2010-03-09 23:20 编辑 [code]#include char str[]; int main() { char str[10]; return 0; }[/code]为什么上面代码不会出现重复定义 , 改成下面就出现重复定义[code] #include int main() { char str[]; char str[10]; return 0; }[/code]http://learn.akae.cn/media/ch23s09.html 具有不完全类型的变量可以通过多次声明组合成一个完全类型,比如数组str声明两次: c...

by shihyu - C/C++ - 2010-03-10 23:19:55 阅读(5693) 回复(16)

以下是小弟写的一个内核模块,编译时出错,错误行为: printk(KERN_ALERT"pa->_count: %lx", page_to_pfn(pa));//atomic_read(pa->_count)); //(pa - mem_map)/sizeof(struct page)); 提示说: /home/Royale/module_pro/mem_map_test.c:13: 错误:在指向不完全类型指针上执行算术运算 /home/Royale/module_pro/mem_map_test.c:13: 错误:在指向不完全类型指针上执行算术运算 代码为: #include #include

by It'sGifted - 内核源码 - 2008-09-12 19:31:33 阅读(1642) 回复(1)

这个问题不是很确定,请大虾帮忙啊!

by xiaoguazi - C/C++ - 2003-12-05 16:03:57 阅读(1565) 回复(5)

各位帮帮忙,看看这是什么问题 我刚刚升级了gcc把原来debian自带的gcc3.3.5生机到了4.1.0。编译别的程序的时候都没有问题。都是一切正常 但是我编译安装mico的时候就报错 警告:提领类型双关的指针将破坏强重叠规则 这是什么问题啊? 那位能教教兄弟

by cnhtml - Linux环境编程 - 2007-01-30 11:53:05 阅读(5576) 回复(0)

以这个为例:int * i; 指针类型是int *; 而指针指向类型则是int. 第二个很好理解嘛,表示指针指向的bug类型是int型,编译器解析的时候将其中数据作为int进行解析,那第一个喃? 对于32位系统来讲,不管指针类型是啥,其大小都是4字节吧,那不同的类型有啥差别喃?

by magicrobot1984 - C/C++ - 2010-07-21 21:00:36 阅读(5268) 回复(17)