#include <iostream>
using namespace std;
void prt(int*x,int *y,int *z)
{
cout<<++*x<<","<<++*y<<","<<*(z++)<<endl;
cout << &z<<endl;
}
int a=10,b=40,c=20;
void main()
{
prt(&a,&b,&c);
cout<<&c<<endl;
prt(&a,&b,&c);
cout << &c<<endl;
}
11,41,20
0012FEF8
00477DC8
12,42,20
0012FEF8
00477DC8
请六楼解释下Z的地址为什么也没变呢??
using namespace std;
void prt(int*x,int *y,int *z)
{
cout<<++*x<<","<<++*y<<","<<*(z++)<<endl;
cout << &z<<endl;
}
int a=10,b=40,c=20;
void main()
{
prt(&a,&b,&c);
cout<<&c<<endl;
prt(&a,&b,&c);
cout << &c<<endl;
}
11,41,20
0012FEF8
00477DC8
12,42,20
0012FEF8
00477DC8
请六楼解释下Z的地址为什么也没变呢??
无节操,无真相