mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-02-03 18:43:52 +08:00
13 lines
171 B
C++
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;
|
|
|
|
}
|