Autor Beitrag
reimo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75



BeitragVerfasst: Mo 01.03.04 16:04 
Hi,

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
  TTest1 = class
     t1: Integer;
     t2: Integer;
     constructor Create;
  end;

  TTest2 = class(TTest1)
     t3: Integer;
     t4: Integer;
     constructor Create;
  end;

constructor TTest1.Create;
begin
   t1 := 1;
   t2 := 2;
end;

constructor TTest2.Create;
begin
//   TTest1.Create;   ???
   t3 := 3;
   t4 := 4;
end;


wie rufe ich den Konstruktor von TTest1 auf, damit die geerbten Variablen wie bei TTest1 initialisiert werden?

mfg
reimo

edit
ups falsches forum

Moderiert von user profile iconPeter Lustig: Topic verschoben
Moderiert von user profile iconTino: Titel geändert.
Brainiac
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 01.03.04 16:47 
Titel: Re: Klassenfrage
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
constructor TTest1.Create;
begin
   t1 := 1;
   t2 := 2;
end;

constructor TTest2.Create;
begin
   inherited;
   t3 := 3;
   t4 := 4;
end;
reimo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75



BeitragVerfasst: Mo 01.03.04 16:51 
danke