#include <iostream> using namespace std; class A { public: A(int size); const int SIZE; void go() { cout<<SIZE<<endl; } }; A::A(int size):SIZE(size) { } void main() { A a(100); A b(200); a.go(); b.go(); } 类的常量固定。。。但不同对象也具有不同常量