ChinaUnix.net
相关文章推荐:

passing argument 1 of ‘schedulework’ from incompatible pointer type

struct node{ char name[16]; int id; struct node *next; }; struct node *stu1; sturct node *p; .......//some code stu1->next=p; // 报:warning: assignment from incompatible pointer type 哪错了? 谢谢

by john.daker - C/C++ - 2009-07-01 16:02:57 阅读(6959) 回复(9)

相关讨论

[code]/* open close list 表 */ typedef struct { int n_f; int n_x; int n_y; int nfather_x; int nfather_y; struct spaylist *next; }spaylist; static spaylist *open_list, *close_list; /*删除结点*/ spaylist *del(spaylist *head,int num_x,int num_y) { spaylist *p1, *p2; if(head == NULL) { printf("\nlist null!\n"); ...

by jd808 - C/C++ - 2010-01-09 12:57:44 阅读(3167) 回复(1)

1. gcc version 4.1.2 2. 部分源码: int compare_name( dir_ const *a, dir_ const *b) {   return strcmp(a->name, b->name); }   int sort_dirs(dir_ *dirs, int dir_index) {   qsort(dirs,dir_index,sizeof(dir_),compare_name);   return 0; } 3. 编译时: gcc -c -Wall -O2 -fPIC -I../include -o ../src/log/rollover.o ../src/log/rollover.c ../src/log/rollover.c: In function...

by tessykandy - C/C++ - 2009-04-10 13:42:04 阅读(4508) 回复(3)

本帖最后由 梅川内依酷 于 2010-08-30 11:43 编辑 为什么被volatile 修饰过的变量在取地址运算(或者取地址写运算)时编译器会有如此warning。 谢谢先。

by 梅川内依酷 - C/C++ - 2010-08-30 11:48:29 阅读(2897) 回复(1)

在solaris10下使用如下的tcp客户端:#include "cliserv.h" int main(int argc,char argv[]){ struct sockaddr_in serv; char request[REQUEST],reply[REPLY]; int sockfd,n; if(argc!=2) err_quit("usage: tcpclient "); if((sockfd=socket(PF_INET,SOCK_STREAM,0))<0) err_sys("socket error"); memset(&serv,0,sizeof(serv)); serv.sin_family=AF_INET; serv.sin_addr.s_addr=inet_addr(argv[1]); serv...

by edwardking - C/C++ - 2009-12-14 14:42:03 阅读(3658) 回复(3)

问个关于拷贝构造函数的问题: //test.cpp class A{ private: int i; public: A(int x = 2): i(x) { } A(const A &a){ i = a.getValue();////////////////////////this line? } int getValue(){ return i; } }; int main() { A a1(3); A a2(a1); } 编译错误是: test.cpp: In copy constructor `A::A(const A&)': test.cpp:7...

by wbyanhust - C/C++ - 2006-09-14 20:24:39 阅读(1681) 回复(1)

[code] #include #include type.h> #include #include // For bool, false, true #include // For strcmp() struct Family * get_person(void); struct Famliy *pmember1; struct Family *pmember2; bool set_ancestry_fuck(struct Famliy *pmember1, struct Family *pmember2); struct Date { int day; int month; int year; }; struct Family { st...

by 蓝天下的乌鸦 - C/C++ - 2012-11-14 14:51:34 阅读(1985) 回复(6)

dereferencing pointer to incomplete type dereferencing pointer to incomplete type 的错误也是未包含某些头文件造成的! 分析数据包:判断通信双方的操作系统、网络信息流量、通过路由的数据包大小、数据包内容。 以太网:以太网的桢? 以太网中,数据是以被称为帧的数据结构本为单位进行交换的。 现在最常用的帧格式MAC V2 v2帧的格式: (插入8字节)目的地址(6字节)-源地址(6字节)-类型(2字节)-数据(46-150...

by cbc - MySQL文档中心 - 2005-12-02 13:24:31 阅读(1141) 回复(0)

我反复检查了代码,是没有错的。 在网上简单搜了一下,说是头文件包含的问题。 我这网络访问受限,百度快照都打不开,只能跑这来问问了。 好心人给指点个迷津。:lol:

by sjh_311 - C/C++ - 2010-11-29 14:59:37 阅读(12322) 回复(10)

我把2.4下的一段代码移到2.6下,但是在编译到调用LIST_FIND()的时候报这个错: dereferencing pointer to incomplete type 请问下,是什么问题阿 代码如下: #include types.h> #include #include #include #include #include #include #include #include #include

by falcon_13 - Linux环境编程 - 2007-05-12 18:39:20 阅读(2889) 回复(1)

socket 编程中,通过gethostbyname() 或者 gethostbyaddr 取得主机的 hostent 解构的信息, 现在从中提取出地址信息: [code] struct host * host; struct sockaddr_in address; .... ... ... memcpy (&address.sin_addr, host->h_addr_list[0], sizeof(address.sin_addr)); 或者: address.sin_addr=*((struct in_addr *)host->h_addr); [/code] 编译的时候出现这样的错误: error: dereferencing pointer to incomplete type ...

by Co_Coiiz - C/C++ - 2006-12-21 16:21:40 阅读(9242) 回复(12)