Files
homework/指针/指针地址.cpp
2026-03-06 22:37:01 -05:00

14 lines
288 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
1 #include<iostream>
2 using namespace std;
3
4 int main(){
5
6 int a=10;
7 int * ptr_a ;
8
9 ptr_a=&a;
10 cout << "我是内存地址: "<<ptr_a <<" 我是地址内的值 "<< * ptr_a<<endl;
11
12 return 0;//这个可以省略
13
14 }