fix #284,修改const指针中的错误内容并增加样例

This commit is contained in:
laialaodi
2023-04-25 21:29:58 +08:00
committed by Francis
parent 93e42fee3a
commit 59fc284a0f
2 changed files with 32 additions and 21 deletions

View File

@@ -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;