将下面的程序补充完整

来源:百度知道 编辑:UC知道 时间:2024/05/15 16:41:17
#include<iostream.h>
class Test {
private:
int num;
float f1;
public:
test();
test(__,__);
getint(){return num;}
getfloat(){return f1;}
};
test_test()
{
cout<<"默认初始化"<<endl;
__=0;
__=0.0;
}
test_____test(__n,__f)
{
cout<<"初始化"<<endl;
____=n;
____=f;
}
void main()
{
test a;
test b(2,5.5);
}

#include<iostream.h>
class Test {
private:
int num;
float f1;
public:
test();
test(__,__); //test(int n,float f);
getint(){return num;}
getfloat(){return f1;}
};
test_test() //test::test()
{
cout<<"默认初始化"<<endl;
__=0; //num=0;
__=0.0; //f1=0.0;
}
test_____test(__n,__f) //test::test(int n,float f)
{
cout<<"初始化"<<endl;
____=n; //num=n;
____=f; //f1=f;
}
void main()
{
test a;
test b(2,5.5);
}