页面顶部 Top
文件:  root - diary - 2007 - 2007-06 - 2007-06-19_01.19AM.html
标签: 学习笔记, Learning Notes, | 英文 | 主页 | 类别: 计算机科学 | 20634 次阅读, 48394 次搜索 | 114 个单词

定阅此目录的博客 | 浏览 | 博客存档

I was stuck the whole afternoon in debugging... finally i found something interesting...

Every time Delphi's Dynamic Array , (setLength fun) is extended, the original array cells' addresses may be changed...

Because I use TTreeView to link its Data (Pointer) to a particular cell of a dynamic array.

e.g.

TreeView.Data:=@dynamic_array[i];

and

unfortunately, the program adds one cell to dynamic_array somewhere...

setLength(dynamic_array,length(dynamic_array)+1);

the original cells' address are totally different, which is really confusing....

anyway, i solved this by taking the alternative...

TreeView.Data:=Pointer(i);

when i use it, i go for something like this..

dynamic_array[integer(TreeView.Data)];

Haha, everything works out finally.
标签: 学习笔记, Learning Notes, | 英文 | 主页 | 类别: 计算机科学 | 20634 次阅读, 48394 次搜索 | 114 个单词 定阅此目录的博客

猜您喜欢...

  1. Daily Interview Problem: Reverse Words in a String
  2. Daily Interview Problem: Merge List Of Number Into Ranges
  3. Daily Interview Puzzle: Falling Dominoes
  4. Daily Interview Problem: Product of Array Except Self
  5. Spreadsheet Columns
  6. CVE-2015-8874 - cPanel EasyApache Vulnerabilities
  7. Fibonacci coding
  8. Daily Interview Question: Find Cycles in a Graph
  9. Spectrum Master
  10. Reverse a Linked List

评论 (0)

您的邮件 (不公开域名部分):

您的评论:

悄悄话(发邮件) 颜色 更多笑脸 S x y @

验证码 (点击图片更新):

    当前页暂时没有评论。


最后更新: October 30 2020 14:21:12 | RSS Subscription
牛排怎么做才好吃? | <meta name="机器人" content="不索引, 跟踪" />