mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-04-01 17:53:26 +08:00
update
This commit is contained in:
12
basic_content/const/funciton_const/condition1/condition3.cpp
Normal file
12
basic_content/const/funciton_const/condition1/condition3.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include<iostream>
|
||||
using namespace std;
|
||||
|
||||
int main(){
|
||||
const int *ptr;
|
||||
int val = 3;
|
||||
ptr = &val; //ok
|
||||
int *ptr1 = &val;
|
||||
*ptr1=4;
|
||||
cout<<*ptr<<endl;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user