pointer.count = counts
If ObjPtr(pointer.nextnode) = ObjPtr(head) Then
Exit Do
End If
Loop While Not pointer Is Nothing
End If
End Sub
Private Sub konglianbiao_Click()
Set pointer = head
Do
Set pointer = pointer.nextnode
If ObjPtr(pointer.nextnode) = ObjPtr(head) Then
Set pointer.nextnode = Nothing
Set n = New node
Set n = pointer
End If
DoEvents
Loop While Not pointer.nextnode Is Nothing
Do
Set pointer = head
Set head = head.nextnode
Set pointer = Nothing
If ObjPtr(head) = ObjPtr(n) Then
Set head = Nothing
Set n = Nothing
End If
DoEvents
Loop While Not head Is Nothing
Form1.Cls
End Sub
Private Sub leave_Click()
End
End Sub
Private Sub print_Click()
Set pointer = head
If head Is Nothing Then
MsgBox "链表为空"
Else
While Not pointer Is Nothing
Print pointer.x
Set pointer = pointer.nextnode
If ObjPtr(pointer) = ObjPtr(head) Then ''''objptr返回对象的地址
Exit Sub ''''strptr返回变长字符串的字符串数据地址
End If ''''varptr返回变量的地址
DoEvents ''''用与获取变量地址,是函数。
Wend
End If
End Sub
该代码在VB6.0 WINME中调试通过。
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




