I know it may pointless questions but I just wonder it is possible to use = operator to copy by reference like that
int a, b=5;
a = b;
a = 4;
cout<<b<<endl;
In other words of what I am trying to do is to make this code print 4, instead of 5.
Thanks for any comments…
You can’t do this because you have already declared
aas anint.Either make
aa reference (int&) or a pointer (int*) tob.