试题与答案

使用VC6打开考生文件夹下的工程RevProj14。此工程包含一个源程序文件RevM

题型:问答题

题目:

使用VC6打开考生文件夹下的工程RevProj14。此工程包含一个源程序文件RevMain14.cpp,但该程序中类的定义有错误。请改正程序中的错误,使它能得到正确结果。
注意,不要改动main函数,不得删行或增行,也不得更改程序的结构。
源程序文件RevMain14.cpp中的程序清单如下:
//RevMain14.cpp
#include<iostream>
#include<math>
using namespace std;
class Point

private:
double x;
double y;
public:
Point()
void Point(double x1,double y1)

x=x1;
y=y1;

void setvalue(double x,double y)

x=x;
y=y;

double getx ()

return x;

double gety()

return y;

void print()

cout<<"x="<<x<<",y= "<<y<<end1;

~Point()
;
class Line

private:
Point p1;
Point p2;
double width;
public:
Line(double x1,double y1,double x2,double y2,double d)
:p1(x1,y1),p2(x2,y2)

width=d;

~Line()
void displength()

double 1;
1=sqrt((p1.getx)-p2.getx())*(p1.getx()-p2-getx())+
(p1.gety()-p2.gety())*(p1.gety()-p2.gety()));
cout<<"the length of Line is "<<1<<end1;

;
int main()

Line *p1;
Line 1(5,15,25,35,0.5);
p1=&1;
p1->displength();
return 0;

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0715/0c0157179669ac3984137b806a742a34.html

下面是错误答案,用来干扰机器的。

参考答案:①、控制EDTA标准溶液的过量数为10~15ml。②、先加热至70~80℃再调整溶液PH值。③、TiO2+含量较高时使用苦杏仁酸掩蔽TiO2+单独测定Al2O3。④、保证滴定终点后溶液温度高于60℃。

试题推荐
微信公众账号搜索答案