Using Reference in c++ -
i using global instance of class class a; a1; using global variable in other functions using reference a& a2 = a1; such changes done locally reflected globally. wanted check whether destructor a2 called local scope ends?
please clarify.
a2 reference not have destructor.
the destructor a1 called when program exits. expecting happen when a2's local scope ends?
Comments
Post a Comment