问答题
1. 找出下列程序的错误,并改正,然后输出代码的正确结果。(20分)
#include
using namespace std;
class test
{
private:
int num;
float fl;
public:
test( );
int getint( ){return num;}
float getfloat( ){return fl;}
~test( );
答案:
答案:程序中存在几个问题,包括缺少构造函数和析构函数的定义,以及缺少主函数(main函数)来创建和使用`test`类的对...