freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c程序設(shè)計(jì)綜合練習(xí)題-讀程序?qū)懡Y(jié)果題-資料下載頁

2025-03-24 04:47本頁面
  

【正文】 cp=new char。 *cp=39。A39。 ip=new int[10]。 for(int i=0。i10。i++) ip[i]=2*i+2。 stp=new struct student。 stpnum=12。 stpname=Li。 stpage=18。 cout*fp *cp endl。 coutnum=stpnum name=stpname age=stpageendl。 for(i=0。i10。i++) coutip[i] 。 coutendl。 delete cp。 delete fp。 delete []ip。 delete stp。 }31. ***include class Point{ public: Point(int xx=0,int yy=0) {X=xx。 Y=yy。cout構(gòu)造函數(shù)被調(diào)用endl。} Point(Pointamp。 p)。 int GetX( ) {return X。} int GetY( ) {return Y。} private: int X,Y。}。Point::Point (Pointamp。 p){ X=。 Y=。 cout拷貝構(gòu)造函數(shù)被調(diào)用endl。}Point fun2( ){ Point A(1,2)。 return A。}void fun1(Point p){ cout( )endl。} void main( ){ Point A(1,2)。 fun1(A)。 Point B(A)。 cout( )endl。 B=fun2()。 cout( )endl。}32. ***include include class Point {public: Point(int xx=0, int yy=0) { X=xx。Y=yy。 cout構(gòu)造函數(shù)被調(diào)用endl。 } Point(Point amp。p)。 int GetX() {return X。} int GetY() {return Y。}private: int X,Y。 }。Point::Point(Point amp。p){ X=。 Y=。 coutPoint拷貝構(gòu)造函數(shù)調(diào)用endl。}class Distance{public: Distance(Point xp1, Point xp2)。 double GetDis(){return dist。}private: Point p1,p2。 double dist。 }。Distance::Distance(Point xp1,Point xp2):p1(xp1),p2(xp2){ coutDistance構(gòu)造函數(shù)調(diào)用endl。 double x=double(()())。 double y=double(()())。 dist=sqrt(x*x+y*y)。}void main(){ Point myp1(1,1),myp2(4,5)。 Distance myd(myp1,myp2)。 coutThe distance is:。 cout()endl。}33. include class Base{ public: Base(int x,int y) { a=x。 b=y。 } void Show() { coutBase: a,bendl。 } private: int a,b。 }。 class Derived : public Base{ public: Derived(int x,int y,int z) : Base(x,y),c(z) {} void Show() { coutDerived: cendl。 } private: int c。 }。 void main() { Base b(50,50),*pb。 Derived d(10,20,30)。 pb=amp。b。 pbShow()。 pb=amp。d。 pbShow()。 }
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1