const
摘要:
1.函数名前加const对于内置类型,如int int fun()const int fun()int const fun()一个东东.,没区别对于自定义类型,或指针,如classA, int *pconst int* fun()int* const fun()意思都是返回的int指针是const的,所以 int a = *fun();//Ok int *b = fun();//挂掉2.函数名后加const这个直接看MSDN解释就清楚了,To declare a constant member function, place the const keyword after the cl... 阅读全文
posted @ 2011-12-01 17:07 hgy413 阅读(137) 评论(0) 推荐(0) 编辑