V
V
vladislav96199962019-01-29 08:45:16
C++ / C#
vladislav9619996, 2019-01-29 08:45:16

What do the following ads mean?

I don't understand the meaning of the following declarations:
- void a(A);
- void b(const A);
- void c(A*);
- void d(A**);
-void e(A&);
- void f(const A&);
-void g(A&&);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor, 2019-01-29
@vladislav9619996

Roughly speaking, something like this
- void a(A); // The function accepts an object of type A
- void b(const A); // The function accepts an object of type A (in the body of the function, the object will be considered constant)
- void c(A*); // The function takes a pointer to an object of type A
- void d(A**); // The function takes a pointer to A*
- void e(A&); // The function takes a reference to an object of type A
- void f(const A&); // The function takes a constant reference to an object of type A
- void g(A&&); // The function takes an r-value reference to an object of type A

S
Soslan Khloev, 2019-01-29
@hloe0xff

It?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question