打印本文 打印本文 关闭窗口 关闭窗口
循环链表以及相关操作(VB实现)
作者:武汉SEO闵涛  文章来源:敏韬网  点击数1902  更新时间:2009/4/23 16:38:02  文章录入:mintao  责任编辑:mintao
sp;     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中调试通过。

上一页  [1] [2] 

打印本文 打印本文 关闭窗口 关闭窗口