Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Features | References & Pointers
C++ Intermediate | Mobile-Friendly

Features

Swipe um das Menü anzuzeigen

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:

123456
int a = 2; int *pa = &a; cout << a << endl; *pa = 50; cout << a;

References:

123456
int a = 2; int &ra = a; cout << a << endl; ra = 50; cout << a;
question-icon

Rewrite the variable x using the reference and the pointer in this order.

int x = 42;
int *px = &x;
int &rx = x;

 = 3;
cout<<
<< endl;

=2;
cout<<
;
3
2

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 8

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

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:

123456
int a = 2; int *pa = &a; cout << a << endl; *pa = 50; cout << a;

References:

123456
int a = 2; int &ra = a; cout << a << endl; ra = 50; cout << a;
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 2. Kapitel 8
some-alt