A
A
Anton_repr2020-05-20 18:11:42
C++ / C#
Anton_repr, 2020-05-20 18:11:42

How to create an instance of a class?

The following is not entirely clear to me: than Address adress = new Address(); different from Address adress;
Doesn't seem to make a difference, does it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DanielMcRon, 2020-05-20
@Anton_repr

Adress is considered an empty reference, and with new, a place in memory is allocated for it for further work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question