
#include
using namespace std;
int main(){
const char *p;
p = "abc";
cout<
const修饰*,不能通过指针改变所指对象的值,指针本身可以改变
const修饰p,不能改变指针本身的值
欢迎分享,转载请注明来源:内存溢出

#include
using namespace std;
int main(){
const char *p;
p = "abc";
cout<
const修饰*,不能通过指针改变所指对象的值,指针本身可以改变
const修饰p,不能改变指针本身的值
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)