首页 > 试题广场 >

完成下列类的定义。

[填空题]

完成下列类的定义。

class test

{

private:

    num;

    float x;

public:

    test(int,float f);

    test(test&);

    ___ _ 1 _ ___   // 析构函数

};

test::test(int n,float f)

{

    num=n;

    ___ _ 2 _ _

}

test::test(text& t)

{

    3

    x=t.f1;

}
~test() {  }
x = f;
num = t.num;
发表于 2020-12-22 18:42:45 回复(0)