I think const is rarely used to decorate a member variable, if it is used to decorate a function, it means that it will not change the variable(normally member variable).normally, const shows that the variable it decorates can't be changed. yet static variable always used as global variable to let other functions or class to share it.
你甚至可以:某个类成员
static const int i = 100;
if it is used to decorate a function, it means that it will not
change the variable(normally member variable).normally, const shows that the variable it decorates can't be changed.
yet static variable always used as global variable to let other functions or class to share it.