C++
Declaring a member function with the const keyword specifies that the function is a "read-only" function that does not modify the object for which it is called.
To declare a constant member function, place the const keyword after the closing parenthesis of the argument list. The const keyword is required in both the declaration and the definition. A constant member function cannot modify any data members or call any member functions that aren't constant.
posted on 2008-07-17 17:36 aslucky 閱讀(262) 評論(0) 編輯 收藏 引用 所屬分類: C++
Powered by: C++博客 Copyright © aslucky