求解答这个程序结果是多少

发布时间:2019-07-29 16:44:20

# include  <iostream.h>

class  Class

{ public :

   Class ( int  n = 6 ,  int  m = 7 ) ;

~Class ( ) ;

void  Set ( int  n ,  int  m )  { x = n ;  y = m ; }

   private :

     int  x,  y ;

  } ;

  Class :: Class( int  n,  int  m)

{

   Set( n,  m ) ;

   cout <<“Construct :  x= ”<< x <<“,  y= ” << y << endl ;

  }

Class :: ~Class( )

{

cout <<“Destruct :  x=” << x <<“,  y= ” << y << endl ;

void  main( )

{                                   

Class  a ( 5 ) ;

Class  b ( 1 ,  3 ) ;

cout <<“exiting…\n ” ;

   }


推荐回答

还没有选出推荐答案,请稍候访问或查看其他回答!
以上问题属网友观点,不代表本站立场,仅供参考!