Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Introduction to References | References Fundamentals
C++ Pointers and References

bookIntroduction to References

Desliza para mostrar el menú

A reference is simply another name for an existing variable. Instead of creating a new variable with its own memory, a reference points to the same memory location as the original variable. This means both names work with the same value.

reference.h

reference.h

copy
12
int originalVariable = 42; int& referenceVariable = originalVariable;

So, when you use referenceVariable, you are actually working with originalVariable.

Advantages of Reference

question mark

What is false about the references?

Select the correct answer

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 1

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

Sección 3. Capítulo 1
some-alt