mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-02-03 18:43:52 +08:00
10 lines
215 B
C++
10 lines
215 B
C++
#include <iostream>
|
||
using namespace std;
|
||
int main() {
|
||
int num = 0;
|
||
int *const ptr = # // const指针必须初始化!且const指针的指向不能修改
|
||
int *t = #
|
||
*t = 1;
|
||
cout << *ptr << endl;
|
||
}
|