the book page 401(yes,It is a Chinese edition).Say about "const static" parameter
the book says,When a const static data member is initialized in the class body, the data member must still be defined outside the class definition.
1 2 3 4 5 6 7 8 9 10
class Account {
public:
staticdouble rate() { return interestRate; }
staticvoid rate(double); // sets a new rate
private:
staticconstint period = 30; // interest posted every 30 days
double daily_tbl[period]; // ok: period is constant expression
};
1 2 3
// definition of static member with no initializer;
// the initial value is specified inside the class definition
constint Account::period;