20. 指针初始化

创建日期:2024-07-11
更新日期:2025-02-01

init_ptr.cpp

#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;
}