做题了
2026-01-14 16:07:17
发布于:上海
3阅读
0回复
0点赞
#include <iostream>
using namespace std;
int main() {
int a = 10;
int &ref = a;
int *ptr = &a;
ref = 20;
*ptr = 30;
cout << a << " " << ref << " " << *ptr << endl;
return 0;
}
这里空空如也
2026-01-14 16:07:17
发布于:上海
#include <iostream>
using namespace std;
int main() {
int a = 10;
int &ref = a;
int *ptr = &a;
ref = 20;
*ptr = 30;
cout << a << " " << ref << " " << *ptr << endl;
return 0;
}
这里空空如也
有帮助,赞一个