33,321
社区成员




#include <iostream>
#include "9.7.twofile2.cc"
int tom = 3;
int dick = 30;
static int harry = 300;
void remote_access();
int main()
{
using namespace std;
cout << "main() reports the following addresses: \n";
cout << &tom << " = &tom, " << &dick << " = &dick, ";
cout << &harry << " = &harry\n";
remote_access();
return 0;
}
#include <iostream>
extern int tom;
static int dick = 10;
int harry = 10;
void remote_access()
{
using namespace std;
cout << "remote_access() the following address: \n";
cout << &tom << " = &tom, " << &dick << " = &dick, ";
cout << &harry << " = &harry\n";
}