如何判断const修饰的内容?

来源:互联网 发布:json在线解析sojson 编辑:程序博客网 时间:2024/06/05 10:12
只需要记住两点:
1、const永远修饰它左边的东西
2、如果const左边没有内容,则修饰它右边的内容

例如:
const int *a = 0;
int const *a = 0;
两者的功能是一样的。
原创粉丝点击