const 永远不变
static 能保存变化

解决方案 »

  1.   

    这两个东西完全不同!
    你甚至可以:某个类成员
    static const int i = 100;
      

  2.   

    还是不大明白。在定义成员变量或成员函数或参数的时候也用道const做什么用?
      

  3.   

    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.