V victorachc Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-22 #1 case NMHdr^.code of //^可以不要,why? NM_CLICK,NM_RCLICK:..... 请问^代表何义?
C coolbaby Unregistered / Unconfirmed GUEST, unregistred user! 2002-07-22 #3 p^ 就是指针p所指的地址的内容 understand
S SupermanTm Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-01 #5 type TMyDataStru = Integer; PMyDataStru = ^TMyDataStru; var X: TMyDataStru; P: PMyDataStru; begin X:= 5; New(P); P^:= X; ... Dispose(P); end; 看懂了么?
type TMyDataStru = Integer; PMyDataStru = ^TMyDataStru; var X: TMyDataStru; P: PMyDataStru; begin X:= 5; New(P); P^:= X; ... Dispose(P); end; 看懂了么?
V virtualmfc Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-01 #6 在C/C++语言中指针是这样使用的: typedef struct _Point { double x; double y; }Point; Point aPoint,*pp; //声明了一个Point结构的变量和一个Point结构的指针变量 pp = &aPoint; //pp指向aPoint pp->x = 5.0;//访问aPoint的X成员 pp->y = 8.0;//访问aPoint的Y成员 而在DELPHI中,其指针类型更加严格,需要改成下面的定义: Point = record x:double; y:double; end; PPoint = ^Point; aPointoint; appPoint; app = @aPoint;//app指向aPoint记录 app^.x = 6.0; app^.y = 8.0;//访问aPoint的x和y成员 现在明白了吗。^在声明时指明是指针类型,在使用时表明是解引用。
在C/C++语言中指针是这样使用的: typedef struct _Point { double x; double y; }Point; Point aPoint,*pp; //声明了一个Point结构的变量和一个Point结构的指针变量 pp = &aPoint; //pp指向aPoint pp->x = 5.0;//访问aPoint的X成员 pp->y = 8.0;//访问aPoint的Y成员 而在DELPHI中,其指针类型更加严格,需要改成下面的定义: Point = record x:double; y:double; end; PPoint = ^Point; aPointoint; appPoint; app = @aPoint;//app指向aPoint记录 app^.x = 6.0; app^.y = 8.0;//访问aPoint的x和y成员 现在明白了吗。^在声明时指明是指针类型,在使用时表明是解引用。
N Nizvoo Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-01 #7 引用 var I: Integer; PI: ^Integer; begin I := 12; PI := @I; PI^就是12表示引用 @取址 ^引用 end;