next up previous
Next: Pointer auf int II Up: Pointer Puzzles Previous: Pointer Puzzles

Pointer auf int

void function()
{
   int i=5;
   int *ptr;
   ptr = &i;
   cout << *ptr << " ist gleich " << i << "\n";
}

 
Abbildung 1: Pointer
Programm ist korrekt!
Ausgabe: 5 ist gleich 5


next up previous
Next: Pointer auf int II Up: Pointer Puzzles Previous: Pointer Puzzles

© 1997 Gottfried Rudorfer, C++-AG, Lehrveranstaltungen, Abteilung für Angewandte Informatik, Wirtschaftsuniversität Wien, 3/19/1998