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

9 lines
159 B
C++

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