Contenido del Curso
C++ Intermediate | Mobile-Friendly
C++ Intermediate | Mobile-Friendly
Features
If we write some new data to a pointer or a link, then this will also be reflected in the variable to which they point.
Pointers:
int a = 2; int *pa = &a; cout << a << endl; *pa = 50; cout << a;
References:
int a = 2; int &ra = a; cout << a << endl; ra = 50; cout << a;
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 8