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