16 lines
382 B
C++
16 lines
382 B
C++
|
// init_ptr.cpp -- initialize a pointer
|
||
|
#include <iostream>
|
||
|
int main()
|
||
|
{
|
||
|
using namespace std;
|
||
|
int higgens = 5;
|
||
|
int * pt = &higgens;
|
||
|
|
||
|
cout << "Value of higgens = " << higgens
|
||
|
<< "; Address of higgens = " << &higgens << endl;
|
||
|
cout << "Value of *pt = " << *pt
|
||
|
<< "; Value of pt = " << pt << endl;
|
||
|
// cin.get();
|
||
|
return 0;
|
||
|
}
|