const

如何判断const修饰的内容:

1、const永远修饰它左边的东西;

2、如果const左边没有内容,则修饰它右边的内容

栗子:

int const *a = 0;

const int *a= 0;

两者是一样的!!!

posted @ 2020-11-02 20:04  Anita光子  阅读(26)  评论(0编辑  收藏  举报