全文预览

C++面向对象程序设计教程(二版)讲稿

上传者:蓝天 |  格式:pdf  |  页数:76 |  大小:13126KB

文档介绍
_squareop,qr€Y{|}RS\r(\rcout$”Theexternalsquare'sareais;\rcout$4*r*r$endl;\r)\rvoidperimeter()\rmnIJperimeter(),U?circleop,qr€Y{|}[\\r(\rcout$”Theexternalsquare'sperimeteris”;\rcout$8*r$endl;\r)\r)\rvoidmain()\r(\rshape*ptr;IJfD?circle?‚ptr\rcircleobl(5);0@a}?P`obi,ƒ„…†‡5\rin_squareob2(5);//0@zY{|}?P`ob2,ƒ„…†‡5\rex_squareob3(5);0@€Y{|}?P`ob5,ƒ„…†‡5\rptr=&obl;D?‚ptrˆ‰a}?P`obiŠ‹\rptr->area();areaqra}RSEvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rC++5d_P75\rptr->perimeter();perimeter()qra[\\rptr=&ob2;//D?‚ptrˆ‰zY{|}?P`obiŠ‹\rptr->areaO;_areaqrzY{|}RS\rptr->perimeter();perimeter()qrzY{|}[\\rptr=&ob3;_D?‚ptrˆ‰€Y{|}?P`ob3\rptr->areaO;_areaqr€Y{|}RS\rptr->perimeter();perimeter()qr€Y{|}[\\r)\r&5.28(+P218)()\r(5d‘)\rC++5d_P76

收藏

分享

举报
下载此文档