init_ptr.cpp 367 B

123456789101112131415
  1. // init_ptr.cpp -- initialize a pointer
  2. #include <iostream>
  3. int main()
  4. {
  5. using namespace std;
  6. int higgens = 5;
  7. int * pt = &higgens;
  8. cout << "Value of higgens = " << higgens
  9. << "; Address of higgens = " << &higgens << endl;
  10. cout << "Value of *pt = " << *pt
  11. << "; Value of pt = " << pt << endl;
  12. // cin.get();
  13. return 0;
  14. }