Tuesday, June 5, 2007

const

static member function can NOT be modified with const or volatile. 静态成员函数不能被const 或者volatile修饰,除了在类体中的函数声明前面加上关键字static,与非静态成员函数的声明相同.出现在类体外的函数定义不能指定关键字static.静态成员函数没有this指针.

Not declaring a function const means the function cannot be called by a const reference or const pointer argument.

No comments: