一维数组怎么转为二维数组啊
将一个一维数组a(9)中各元素按行的顺序放入二维数组b(3,3)
Option Explicit Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) Private Sub Command1_Click() Dim a(1 To 9) As Long Dim b(1 To 3, 1 To 3) As Long Dim i As Long For i = 1 To 9 a(i) = i * 10 + Rnd() * 10 Next i Call CopyMemory(b(1, 1), a(1), 4 * 9) End Sub
[此贴子已经被作者于2021-5-13 15:07编辑过]