#include<iostream>
#include<stdlib.h>
using namespace std;
int* text()
{
static int* a;
static int e;
//a = &e;
cout <<"e"<< e << endl;
return a;
}
int main()
{
int b = 10;
*text()=b;
int* c = &b;
*c = 100;
int* f = text();
cout << b << endl;
cout << *c<< endl;
cout << *f << endl;
cout << *text() << endl;
}
彻底搞懂指针
最新推荐文章于 2024-10-04 22:43:57 发布