mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-02-09 05:23:22 +08:00
fix #284,修改const指针中的错误内容并增加样例
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
using namespace std;
|
||||
int main() {
|
||||
int num = 0;
|
||||
int *const ptr = # // const指针必须初始化!且const指针的值不能修改
|
||||
int *const ptr = # // const指针必须初始化!且const指针的指向不能修改
|
||||
int *t = #
|
||||
*t = 1;
|
||||
cout << *ptr << endl;
|
||||
|
||||
Reference in New Issue
Block a user