#include<iostream.h>class Con{char ID;public:char getID(){return ID;}Con(){ID='A';cout<<1;}Con(char id){ID=id;cout<<2;}Con(Con& c){ID=c.getID();cout<<3;}};void show(Con c){cout<<c.getID();}void main(){Con c1;show(c1);Con c2('B');show(c2);}运行结果是13A23B问:哪来的3啊
添加回答
举报
0/150
提交
取消