????д?????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????ò????????????????顢??????????????????????????о????????????????
????1??????????????
?????????????????????????????????????????塢???????????????????????????????????????????????????Щ????
??????????????壺
????In a declaration T D where D has the form * cv-qualifier-seqopt D1 And the type of the identifier in the declaration T D1 is “derived-declarator-type-list T”?? then the type of the identifier of D is “derived-declarator-type-list cv-qualifier-seq pointer to T”. The cv-qualifiers apply to the pointer and not to the object pointer to.
????——????ANSI C++ Standard??
?????????????Щ???????????cv-qualifier-seq
????CV-qualifiers(CV?????)
????CV-qualifiers???????const-qualifier(const?????)??Volatile-qualifier(volatile?????)?????const-volatile-qualifier(const-volatile?????)??
????const?????????????mutable???????????????????const-qualified??
????volatile?????????????????????????volatile-qualified??
????const-volatile?????????????????????????const-volatile-qualified??
??????CV-qualifiers???????????????????????????????????CV-qualifiers???????????????????
???????????????????????CV-qualifier?????????CV-qualifier???????????????????????????CV-qualifier???????????????????CV-qualified????
???????????????壺
????In a declaration T D where D has the form& D1 And the type of the identifier in the declaration T D1 is “derived-declarator-type-list T”?? then the type of the identifier of D is “derived-declarator-type-list cv-qualifier-seq reference to T”. Cv-qualified references are ill-formed except when the cv-qualifiers are introduced through the use of a typedef or a template type argument?? in which case the cv-qualifiers are ignored.
????——????ANSI C++ Standard??
??????????Щ?????????Щ???????????????????????????C++??????????????к????·???????????????????????????£?
???????-???????????T??T*?????T????????????????T*??????????????????T???????????????T???????Щ?????????const??volatile????????????????????壺

????????-?????????????????????????????????????????????????X&???X????????á??????????????????壺

????2???????????????
????????????ò????????????????????????????????????????????????????——???????????????????б???????????????????????????????????????????????????????????????????????????????????????????????????????????????????i.e.??????????????????????????????????á???????У??????????????????????????????????????????????????????

???????????????????????κζ????????????????????????????????п???????????ò????
??????Σ????ò???????????????????”????????”?????????????????????????????????????????ò?????????????????????????????????????++????????????????????????????????????????????????????????????????????????????????????????????????????????????
????#include<iostream>
????using namespace std;
????int main(int argc??char** argv)
????{
????int i=10;
????int& ref=i;
????ref++;
????cout<<"i="<<i<<endl;
????cout<<"ref="<<ref<<endl;
????int j=20;
????ref=j;
????ref++;
????cout<<"i="<<i<<endl;
????cout<<"ref="<<ref<<endl;
????cout<<"j="<<j<<endl;
????return 0;
????}
??????ref??++?????????????????????????????????ref??????”ref=j”??????????ref????????????????i????????j????????????????ref????++???????????j??????Щ???????????????????????????????顣?????????£?

??????Σ???????С??????????????С????????????????????????????????????С??4????????????????

??????????????????????????????????????????????????????????????????????????????????????????????????*??????????????????????????????&????
????????????????????????????????????????????????????????????????????????????????????????????????ú??????????????????????????????????????????????????????NULL????????????const ?????????????????????????????????п??????????????????????????棬free??????????????????????????
??????????????????——???????Щ??????????”???????????棬??????????????????????????????????????????????ò???????”