锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产欧美亚洲精品,国产精品人人做人人爽人人添,欧美主播一区二区三区http://www.shnenglu.com/aslucky/category/7582.htmlC++zh-cnSat, 19 Jul 2008 16:04:57 GMTSat, 19 Jul 2008 16:04:57 GMT60Boost Study step1 浠嬬粛http://www.shnenglu.com/aslucky/articles/56637.htmlasluckyasluckySat, 19 Jul 2008 14:11:00 GMThttp://www.shnenglu.com/aslucky/articles/56637.htmlhttp://www.shnenglu.com/aslucky/comments/56637.htmlhttp://www.shnenglu.com/aslucky/articles/56637.html#Feedback0http://www.shnenglu.com/aslucky/comments/commentRss/56637.htmlhttp://www.shnenglu.com/aslucky/services/trackbacks/56637.html Most Boost libraries are header-only: they consist entirely of header files containing templates and inline functions, and require no separately-compiled library binaries or special treatment when linking.
榪樻湁鍑犱釜鏄彲閫夌紪璇戠殑 A few libraries have optional separately-compiled binaries:
Boost.DateTime has a binary component that is only needed if you're using its to_string/from_string or serialization features, or if you're targeting Visual C++ 6.x or Borland.
]]>Constant Member Functionshttp://www.shnenglu.com/aslucky/articles/56454.htmlasluckyasluckyThu, 17 Jul 2008 09:36:00 GMThttp://www.shnenglu.com/aslucky/articles/56454.htmlhttp://www.shnenglu.com/aslucky/comments/56454.htmlhttp://www.shnenglu.com/aslucky/articles/56454.html#Feedback0http://www.shnenglu.com/aslucky/comments/commentRss/56454.htmlhttp://www.shnenglu.com/aslucky/services/trackbacks/56454.html
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.
// constant_member_function.cpp class Date { public: Date( int mn, int dy, int yr ); int getMonth() const; // A read-only function void setMonth( int mn ); // A write function; can't be const private: int month; }; int Date::getMonth() const { return month; // Doesn't modify anything } void Date::setMonth( int mn ) { month = mn; // Modifies data member } int main() { Date MyDate( 7, 4, 1998 ); const Date BirthDate( 1, 18, 1953 ); MyDate.setMonth( 4 ); // Okay BirthDate.getMonth(); // Okay BirthDate.setMonth( 4 ); // C2662 Error }