Global $nodeArray[50]
$stNode = DllStructCreate("int id;ptr next")
DllStructSetData($stNode, 1, 1)
$head = $stNode
$pre = $head
For $i = 2 To 12
$nodeArray[$i] = DllStructCreate("int id;ptr next")
DllStructSetData($nodeArray[$i], 1, $i)
DllStructSetData($pre, 2, DllStructGetPtr($nodeArray[$i]))
$pre = $nodeArray[$i]
Next
$pre = $head
While DllStructGetData($pre, 1) <> 12
$point = DllStructGetData($pre, "next")
$next = DllStructCreate("int id;ptr next", $point)
$pre = $next
ConsoleWrite(DllStructGetData($next, 1)&@CRLF)
WEnd
|