Question d’entretien chez Support.com

how to use a variable across function without using pointers

Réponse à la question d'entretien

Utilisateur anonyme

20 août 2013

Create a reference to the variable and pass the variable through the functions via reference. Essentially acts like a pointer but eliminates the direct exposure of memory and safeguards the original variable from unwanted change.