when inside a class?
EG:
class A{
int &a;
A(int &a_):a(a_):
}
is a refrence?
Yes, it's a reference to int. https://www.learncpp.com/cpp-tutorial/references/
So if a_ dies a dies too?
No, the references don't infect variables life time.
Обсуждают сегодня