Autor Beitrag
Fabian E.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Sa 08.10.05 16:57 
Hi @all!

Hab hier en Kleines Problem mit nem Programm. Da kommt ne Fehlermeldung und ich weiß nit warum.

Der Code ist folgendermaßen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
z[Zahlen1] := Random(1000000000000000000);
Zahlen[Zahlen1] := IntToStr(z[Zahlen1]);
Listbox1.AddItem(Zahlen[Zahlen1], Form1);
Zahlen1 := Zahlen1 +1;

Der Fehler lautet dann: Acces violation at adress 00403A in module 'Zufallszahlen.exe'. Read of adress A0ED577B.

Wär schön wenn mir jemand helfen könnte.

Fabi
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 08.10.05 17:03 
Was ist z? Was ist Zahl? Sollten es dynamische Arrays sein, dann solltest du zuvor die Länge setzen mit SetLength.
Fabian E. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Sa 08.10.05 17:09 
Oh sorry.

Z : Array[1..24] of Integer;
Zahlen1 : Integer;
Zahlen : Array[1..24] of String;

sry!

Aber ich glaub hab grad selbst die Lösung gefunden.

Fabi