int*型
#include<bits/stdc++.h>
using namespace std;
int main()
{
int val = 5;
int *ptr = &val;
int * &ptr2 = ptr; //ptr2是int* 型,是对str的引用;
*ptr = 6;
cout << val << " " << *ptr <<" "<< *ptr2 << endl;
*ptr2 = 7;
cout << val << " " << *ptr << " " << *ptr2 << endl;
cout << &val << " " << ptr << " " << ptr2 << endl;
delete ptr;
delete ptr2;
}
/*
6 6 6
7 7 7
0x61fe3c 0x61fe3c 0x61fe3c
*/