K
K
Kirill Zhilyaev2017-11-17 22:43:06
Delphi
Kirill Zhilyaev, 2017-11-17 22:43:06

How to implement classes that are related to each other?

_BpKfDgKWxk.jpg
Actually how to make connections between classes. In any case, one of the classes is not defined at the time of the description of the other.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sumor, 2017-11-17
@kirill_782

Forward declaration of classes.

TUniversity = class;

TFaculty = class
private
public
  university : TUniversity;
end;

TUniversity = class
private

public 
    faculties : array of TFaculty;
end;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question