??????????????Ч????????????????????????????????????????????塢?ó???????渳?????ù???????????б????????????и?????????????Ч???????????Ч???????????????

????1?????????????????ɡ?????????????????????洫?????????庯???????????????????????????????????XX???????????

????Ч??????????               ??Ч??????

????void Function( XX xx )       void Function( const XX& xx)
????{                                {
????//??????                              //??????
????}                                 }

????2????????????????????塣??C????????е????????????????????????????C++?ж?????????????????????????????????????????????bCache?"??"????????xx??????????????????Ч???

????Ч??????????                                          ??Ч??????

????void Function( bool bCache )                 void Function( bool bCache )
????{                                                      {
????//??????                                                    //??????
????XX xx;
????if( bCache )
????if( bCache ) {// do something without xx{                                                                                                    return;
????// do something without xx}
????return;                                                  }
????}
????//??xx???в???XX xx;
????//??xx???в???
????…
????return;                                                        return;
????}                                                        }

????3??????????£??????????????????????????????Ч??????????Ч??????????????cache???????????????????????

????Ч??????????                                                ??Ч??????

????void Function( const XX& xx )                    oid Function( const XX& xx )(??????????????????????????????)
????{                                                {
????XX cache;     ???????????????                         XX cache = xx;(???????????????)
????cache = xx ;  ????????????????
????}                                                 }

????4?????????????ó?????????????б????????????и??????????????Ч???????????У?XX????????????????m_strName?????????????????????????String object??????""??????????????????????????assign????m_strName????????????????????Ч?????????????????m_strName?????????

????Ч??????????                                           ??Ч??????

????XX::XX()                                            XX::XX() : m_strName( "" )
????{                                                    {
????m_strName = ""; …
????…
????}                                                     }

????????????????????д????Ч??C++?????????????????????C++???????л??????????????????裬?????????????????д??Ч??C++????????????е??