CPlusPlusThings/basic_content/const/funciton_const/condition1/condition3.cpp
Light-City 8edbbbc5a2 update
2019-11-05 16:56:07 +08:00

13 lines
171 B
C++

#include<iostream>
using namespace std;
int main(){
const int *ptr;
int val = 3;
ptr = &val; //ok
int *ptr1 = &val;
*ptr1=4;
cout<<*ptr<<endl;
}