ChinaUnix.net
相关文章推荐:

Increase in pointer capability

Hi all, I found the following function, which is used to remove the head of a linked list. void RemoveHead(node **head) { node *temp; if (head && *head) { /* Corrected code */ temp = (*head)->next; free(*head); *head = temp; } } 1. Why is the purpose of 'head' in the 'if' condition? Shouldn't '*head' suffice? 2. This function has an argument, which is a po...

by bsd_lite - C/C++ - 2008-10-17 21:58:56 阅读(1459) 回复(4)

相关讨论

A.7.1 pointer Generation If the type of an expression or subexpression is ``array of T,'' for some type T, then the value of the expression is a pointer to the first object in the array, and the type of the expression is altered to ``pointer to T.'' This conversion does not take place if the expression is in the operand of the unary & operator, or of ++, --, sizeof, or as the left operand of an as...

by shihyu - C/C++ - 2007-06-08 20:32:50 阅读(1267) 回复(2)

help! how to increase the size of swap THZ

by 00346179d - HP-UX - 2007-04-13 17:59:03 阅读(1348) 回复(2)

我想增加一个文件系统的大小 ! (/dev/data ) 原大小: # df -k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 65536 55948 15% 1008 4% / /dev/hd2 458752 20380 96% 14990 14% /usr /dev/hd9var 65536 59212 10% 383 3% /var /dev/hd3 65536 63364 4% 40 1% /tmp /dev/hd1 65...

by rinehart - AIX - 2006-02-08 08:40:55 阅读(1826) 回复(3)

table表中某列flag,定义为number(1,0),现将其改为number(2,0)。 我在SQL explorer中修改,commit,apply以后,试着将其中flag列某个数值由9改成11却不成功,提示错误号为12289,capability not supported。 这是什么原因?还需要修改另外的表参数吗?初来乍到,还望不吝指教! 谢谢!

by qiangxg - Oracle - 2003-04-29 14:30:35 阅读(1078) 回复(0)

Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end. Clearly the holy scriptures were mis-transcribed here, as the words should have been ``null pointer'', to minimize confusion between the concept of null pointers and the macro NULL (of which more anon). Otherwise, the meaning is plain. A null pointer points to regions filled with dragons, demons, core dumps, and...

by TomTang - C/C++ - 2006-08-10 08:34:03 阅读(1329) 回复(5)

struct P{ string a; string b; }; struct G{ P ab; G *pt[4]; G(){//initialize new tree node ab.a=" "; ab.b=" "; for(int i=0;i<4;i++) pt=NULL; } }; G g; function(g); 我有以上一些code, 当我在function()里面访问g->pt时就会出错。 在unix下编译时的出错信息是: Error: pointer type needed instead of G. 不懂:cry:怎么回事, 谁能帮帮我~谢谢各位大虾~

by 叨叨323 - C/C++ - 2006-05-26 19:10:17 阅读(954) 回复(4)

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 阅读(1142) 回复(0)

试了一下reference及pointer的用法 ------------------------ int main() { int val=1024; int *&ref = &val } 如此无法通过编译 ------------------------ 于是我改成下面两种即可编译 1. ------------------------- int main() { int val=1024; int *pr = &val int *&ref = pr; } ------------------------- 2. ------------------------- int main() { int val=1024; int *const &ref ...

by syzlmr - C/C++ - 2004-09-19 11:38:29 阅读(759) 回复(1)

我写的print(head)函数里 void print(head)//head 是一个全局变量,是指向链表头的指针 { struct stitch *p; unsigned long sti_count1=0; p=head; .... } 'p=head;'这条语句系统提示"Nonportable pointer coversion" 这是什么原因呀,大家帮帮忙,

by iceblade - C/C++ - 2003-08-01 13:51:02 阅读(1485) 回复(5)