Autor Beitrag
beljo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129



BeitragVerfasst: Mo 24.04.06 10:10 
Hi Leute ich bin dabei mich mit Records zu bescheftigen.
Möchte folgendes machen.
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:
implementation

Type
 Continental= Record
  Luefter      : String;
  Kuehler      : String;
  Elektronik   : String;
end;
Type
 Temic = Record
  Hybridantrieb: Real;
end;


Type
 Teves = Record
  Bremssysteme : Real;
end;

var
Temic: Continental;// Temic und Teves sollen alle Attribute von Continental erben 
Teves: Continental;

Warum klappts so nicht? ( Temic und Teves sollen alle Eingenschaften von Conti erben und andere dazu haben)
Hoffe Ihr könnt mir helfen.
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mo 24.04.06 11:14 
Du deklarierst hier Variablen (Reserviertes Wort var).
Um Vererbungen durchzuführen, musst du mit Klassen und nicht mit Records arbeiten.

_________________
Programmers never die, they just GOSUB without RETURN