hoi,
Ik ben net begonnen met het leren van wat algoritmes adv Introduction to Algorithms.
Nu zit ik al vast bij het eerste algoritme, Insertion-sort
de fout zit bij de pijl; daar zegt visual studio: "Index was outside the bounds of the array."
alvast bedankt voor jullie hulp
Ik ben net begonnen met het leren van wat algoritmes adv Introduction to Algorithms.
Nu zit ik al vast bij het eerste algoritme, Insertion-sort
code:
1
2
3
4
5
6
7
8
9
10
11
12
| Dim Inti, intKey, intteller As Integer
For intteller = 0 To arrIntGetalen.Length - 1
intKey = arrIntGetalen(intteller)
Inti = intteller - 1
-------> While Inti > 0 And arrIntGetalen(Inti) > intKey
arrIntGetalen(Inti + 1) = arrIntGetalen(Inti)
Inti -= 1
arrIntGetalen(Inti + 1) = intKey
End While
Next
MsgBox("done") |
de fout zit bij de pijl; daar zegt visual studio: "Index was outside the bounds of the array."
alvast bedankt voor jullie hulp