C++ const???????
???????????? ???????[ 2015/9/24 13:39:18 ] ????????.NET ????
??????????????
????????п????????????????????????????????(overload)
????void pa(){
????cout<<"a"<<endl;
????}
????void pa() const{
????cout<<"b"<<endl;
????}
?????????д??????????
??????????????????????????????????
????????ó???
??????????????
?????????????????????????????????????????????overload????
????void fun(const int &a)
????{
????cout<<a<<endl;
????}
????void fun(int &a)
????{
????cout<<a<<endl;
????}
????????????????????????????????????????????????const?? ?? ??????const?? ?????????
???????????????
???????????????????????????????????????????????????overload????
????void test(const int* a){
????cout<<*a<<endl;
????}
????void test(int* a){
????cout<<*a<<endl;
????}
????????????????????????????????? const ?? ????const ???????
??????????????????
????????c++ primer?????????????????????????????????????: ClassName* const this//????????const???????????????.
?????????????????????????const??????????????????????????????????????????
??????????????????治?????this?????
????this = 0;//????
?????????????????????????
????void pa();
????void pa() const;
????????д????????????α????????????
????void pa(ClassName *const this);
????void pa(const ClassName *const this);
???????????????????????????
????????????c++?????????????????????????????????const?????const??????????????????this????檔
????????????
???????????????????????????const???η????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11