How can I change the variable to which a C++ reference refers? -


if have this:

int = 2; int b = 4; int &ref = a; 

how can make ref refer b after code?

this not possible, , that's by design. references cannot rebound.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -