\rclassbase{\rpublic:\rvirtualintfunc(){return0;}\r)\r" />

全文预览

C++练习题(摘自自学考试)

上传者:蓝天 |  格式:pdf  |  页数:93 |  大小:11149KB

文档介绍
{\rdoubled;\rinti;\rd=9999;i=88;\rf(d,i)\rcout6"d="6d6"i='*6i6endl;\rd=88;i=9999;\rf(i,d);\rcout6nd=n6d6"i="6i6endl;\r)\r33\r#include<iostream.h>\rclassbase{\rpublic:\rvirtualintfunc(){return0;}\r)\r46/93EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\r200110!"\r#$?\rclassderived:publicbase{\rpublic:\rintfunc(){return100;}\r);\rvoidmain(){\rderivedd;\rbase&b=d;\rcout6b.func()6endl;\rcout6b.base::func()6endl;\r)\r34\r#include<iostream.h>\rclassTest{\rprivate:\rstaticintval;\rinta;\rpublic:\rstaticintfunc();\rstaticvoidsfunc(Test&r);\r};\rintTest::val=20;\rintTest::func0{\rval+=val;\rreturnval;\r}\rvoidTest::sfunc(Test&r){\r&a=25;\rcout6”Results="6r.a;\r)\rvoidmain(){\rcout6MResultl="6Test::func06endl;\rTesta;\rcout6MResult!=''6a.func();\rTest::sfunc(a);\r)\r47/93

收藏

分享

举报
下载此文档