???????????????????????????ó?????????const??????????????????????????????


            Image * const pImg;          //???
            Voice   * const pVoi;        //????


???????????????ó????????б??????????????????????????const???????


People::People( const std::string& n??const int& a??const int& h??const std::stirng& imgFileName??const std::string& vFileName )
:name(n)??age(a)??height(h)??
pImg( imgFileName !="" ? new Image( imgFileName ) : 0 )??
pVoi( vFileName != "" ? new Voice( vFileName ) : 0)
{}


?????????????????????????????????????????????????????????????????????????檔?????????????????????и???????£?


People::People( const std::string& n??const int& a??const int& h??const std::stirng& imgFileName??const std::string& vFileName )
:name(n)??age(a)??height(h)??
pImg( initImage( imgFileName ) )??
pVoi(  initVoice( vFileName ) )
{}

Image* People::initImage(const string& imgFileName)
{
    if(imgFileName !="") return new Image(imgFileName);
    else return 0;
}

Voice* People::initVoice(const string& vFileName)
{
    try
    {
        if(vFileName !="")return new Voice(vFileName)
        esle return 0;
    }
    catch(... )
    {
            delete pImg;
            throw;
    }
}
 


????????????ù???Voice?????м???try...catch...???????pImg???????????????????????????????????????????


const auto_ptr<Image> pImg;
const auto_ptr<Voice>  pVoi;

People::People( const std::string& n??const int& a??const int& h??const std::stirng& imgFileName??const std::string& vFileName )
:name(n)??age(a)??height(h)??
pImg( imgFileName !="" ? new Image( imgFileName ) : 0 )??
pVoi( vFileName != "" ? new Voice( vFileName ) : 0)
{}
 


??????????????????????????????????????????????????????????????????????????????????й????