第二行p是const p++可以,p所指向的内容不可变
第三行对象是const
第四行p is const p++不可以,p 所指向的是person类
总结const 写在的前面对象是const
写在*的后面指针是const
hello world 在代码段不可写;
char s[ ]=“hello world”:将helloworld代码段放在堆里
整个对象里边的值是const不能修改;
this是const;
第二行p是const p++可以,p所指向的内容不可变
第三行对象是const
第四行p is const p++不可以,p 所指向的是person类
总结const 写在的前面对象是const
写在*的后面指针是const
hello world 在代码段不可写;
char s[ ]=“hello world”:将helloworld代码段放在堆里
整个对象里边的值是const不能修改;
this是const;