CPlusPlusThings/english/basic_content/const/funciton_const/condition2/condition2.cpp
2020-07-18 17:09:29 +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;
}