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

9 lines
152 B
C++

#include<iostream>
using namespace std;
int main(){
const int num=0;
int * const ptr=&num; //error! const int* -> int*
cout<<*ptr<<endl;
}