28 Ott 2002
Costruzione di Interfacce - Paolo Cignoni
29
Puntatori e Memoria
•#include <iostream>
•
•using namespace std;
•
•int main(int argc, char **argv
•    int myInteger = 1000;
•    int *myIntegerPointer = &m
•
•    // print the value of the integer before changing it
•    cout << myInteger << endl;
•
•    // dereference pointer and add 5 to the integer it points to
•    *myIntegerPointer += 5;
•
•    // print the value of the integer after
•    // changing it through the pointer
•    cout << myInteger << endl;
•}
•
•