问题详情

( 14 )补充完整下面的类定义:

class XCH{

char* a;

public:

XCH ( char* as ) { // 构造函数

a=new char[strlen ( aa ) +1];

strcpy ( a,aa ) ;

}

XCH& perator= ( const XCH& x ) // 重载赋值函数

Delele []a;

A=new char[strlen ( x.a ) +l];

strcpy ( a, x .a )

【 14 】 ;

}

~XCH () {delete []a;}

};

参考答案
您可能感兴趣的试题