ChinaUnix.net
相关文章推荐:

error ISO C forbids declaration of 'uniqueptr' with no type

#include using namespace std; class Deta {public: Deta(int,int,int); Deta(int,int); Deta(int); Deta(); void display(); private: int x; int y; int z; } Deta :: Deta(int a,int b,int c): x(a),y(b),z(c) {} Deta :: Deta(int a,int b): x(a),y(b) { z=2006; } Deta :: Deta(int a): x(a) { y=1; z=2006; } Deta:: Deta() { x=10; y=1; z=2006; } void Deta::display() {cout<

by iyxing - C/C++ - 2008-03-25 19:03:47 阅读(1536) 回复(1)

相关讨论

错误指向了这一行。 extern master_info_tp* pmaster_info; 我只是声明一个外部结构体指针,这么做不行?

by wang9736 - C/C++ - 2008-11-12 15:51:14 阅读(4832) 回复(6)

[code] #include int getline(char line[],int maxline); int serindex(char s[],char t[]); main(int argc,char *argv[]) { int i; int len; int MAXLINE = 1000; char line[MAXLINE]; printf("argc=%d\nargv=%s\nargc=%s\n",argc,argv[1],argv[2]); if(argc ==3){ while((len = getline(line,MAXLINE)) >0){ serindex(line,argv[2]); ...

by lvscluster - C/C++ - 2009-05-05 14:32:12 阅读(3231) 回复(2)

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 阅读(9253) 回复(12)

我定义了一个 # define ASSERT_ARGS(a) ((void)0) 然后在函数里面使用这个宏,比如: int foo(arg) { ASSERT_ARGS(arg); int i = 0; bar(i); return 1; } 但是编译会出现 iso C90 forbids mixed declarations and code 这个宏如何定义才能绕过这个错误? 不允许交换宏在代码中的位置,仅仅是改写这个宏,宏定义的代码必须能gcc 优化掉,比如((void)0). 这个好像有点难度,我一直没有找到方法。 ...

by zhuomingliang - C/C++ - 2010-11-17 11:03:36 阅读(16741) 回复(17)
by dengcainiao - 内核/嵌入技术 - 2006-12-12 14:58:38 阅读(492) 回复(0)

编译一个内核模块出现如下错误 error: 'for' loop initial declaration used outside C99 mode 模块中有使用C99的指定初始化技术定义一个结构体: static struct file_operations dev_fops = { .ioctl = dev_ioctl, .open = dev_open, .release = dev_release }; 在函数 dev_ioctl() 中使用 for 循环的时候出现上述错误, 请问是什么原因呢? 编译加选项 --std=c99 不能解决问...

by Scorpioo - C/C++ - 2010-05-10 11:35:47 阅读(13946) 回复(1)

本贴我说不好要放在哪个具体的讨论区,觉得c区还合适,就放这里了, 本贴的目的是帮比我还菜的小鸟遇到这个问题好解决些,写完这个我 想在google或者baidu上搜partitions.h:61: error: field `list' has incomplete type 这样的关键字,应该能找到这贴了吧. 我今天在编译linux2.6.14.2的内核的时候,遇到了这个问题, 但是在google和baidu上找,都是提问的,就没有理睬过,那好 我就自己找答案: 主要是针对s3c2410的内核移植, 在我都培植好后...

by fydream - C/C++ - 2015-11-19 16:25:47 阅读(15426) 回复(4)

cstm检测出来 ext/DIMM: ext3a/3b error type :single-bit 88 address(es) with errors logged by memory logging daemon.

by antozerg - HP-UX - 2006-09-28 12:40:08 阅读(2177) 回复(3)

原来在windows下能运行的程序,移植到linux下,出现上述错误,请大侠不吝赐教! 附部分相关代码: struct listen { char Cookie; long RequestTimeStamp; long RequestFileSize; struct listen *left, *right ; }listenqueue; struct BufferQueue *h=NULL ; h=(struct BufferQueue *)malloc(sizeof ( BufferQueue)); h->Cookie=a ; h->RequestTimeStamp=finish ; h->RequestFileSize = (rand()%100) ; h->le...

by 51167899 - C/C++ - 2006-07-24 16:11:47 阅读(1571) 回复(2)

ibm netfinity5500上装sco5.07时get fs type error??? 是什么原因??

by softmachine - 其他UNIX - 2005-06-30 10:21:00 阅读(879) 回复(1)