Registriert seit: 21. Okt 2008
26 Beiträge
|
Re: Array of string - Zugriffsverletzung
6. Feb 2010, 17:14
OK mache ich:
Delphi-Quellcode:
constructor TStundenplan.Create(WeekMod : TWeekMod);
var CurSubjectArr : array of string;
i : integer;
begin
m_DayCount := 0;
if (WeekMod = WM_Normal) then
begin
m_DayCount := 5;
end else
if (WeekMod = WM_SATURDAY) then
begin
m_DayCount := 6;
end;
SetLength(m_DaysArr,m_DayCount);
m_DaysArr[0].m_iCount := 6;
SetLength(CurSubjectArr,m_DaysArr[0].m_iCount);
for i := 0 to m_DaysArr[0].m_iCount -1 do
begin
CurSubjectArr[i] := 'Subject';
Trace(CurSubjectArr[i]);
m_daysArr[0].m_SubjectArr[i] := CurSubjectArr[i];
end;
Das einzig ware im Leben ist DELPHI
...und Musik!
|