c++题目有个错误不知道怎么回事#include#includeusing namespace std;class Rectangle{public:Rectangle(int a1,int b1,int a2,int b2);void area(int a1,int b1,int a2,int b2);void output();Rectangle();private:int ar;};Rectangle::Rectangle(int a1,

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/05 23:01:36
c++题目有个错误不知道怎么回事#include#includeusing namespace std;class Rectangle{public:Rectangle(int a1,int b1,int a2,int b2);void area(int a1,int b1,int a2,int b2);void output();Rectangle();private:int ar;};Rectangle::Rectangle(int a1,

c++题目有个错误不知道怎么回事#include#includeusing namespace std;class Rectangle{public:Rectangle(int a1,int b1,int a2,int b2);void area(int a1,int b1,int a2,int b2);void output();Rectangle();private:int ar;};Rectangle::Rectangle(int a1,
c++题目有个错误不知道怎么回事
#include
#include
using namespace std;
class Rectangle
{
public:
Rectangle(int a1,int b1,int a2,int b2);
void area(int a1,int b1,int a2,int b2);
void output();
Rectangle();
private:
int ar;
};
Rectangle::Rectangle(int a1,int b1,int a2,int b2)
{
}
void area(int a1,int b1,int a2,int b2)//计算面积
{
ar=(-1)*(a1-a2)*(b1-b2);
}
void Rectangle::output()
{
cout

c++题目有个错误不知道怎么回事#include#includeusing namespace std;class Rectangle{public:Rectangle(int a1,int b1,int a2,int b2);void area(int a1,int b1,int a2,int b2);void output();Rectangle();private:int ar;};Rectangle::Rectangle(int a1,
void area(int a1,int b1,int a2,int b2)//计算面积
{
ar=(-1)*(a1-a2)*(b1-b2);
}
这个函数是Rectangle类的一个成员函数,但是你的定义方法认为它是一个全局函数,所以不能识别类的私有变量
改成
void Rectangle::area(.)
{
}

c++题目有个错误不知道怎么回事#include#includeusing namespace std;class Rectangle{public:Rectangle(int a1,int b1,int a2,int b2);void area(int a1,int b1,int a2,int b2);void output();Rectangle();private:int ar;};Rectangle::Rectangle(int a1, 离子符号属不属于化学式?有个题目要写化学式答案却给了离子符号,很奇怪啊.怎么回事?题目中完全看不出是什么溶质 请问欧美的公司的后缀名中CORP.和INC.有什么不同?不要说全称,我知道全称. 四级英语准考证号格式错误怎么回事?已经到了可以查询的时间了啊.不知道怎么回事,格式就是不对.速求回答,.. 径向加速度和角加速度有什么区别我没有重复问啊,不知道怎么回事出了2个,我主要想知道两者的物理意义 嘴上长猴子我不知道怎么回事,嘴上长了个猴子,怎么办? shift+ctrl+c出来的是什么不知道怎么回事,按了这个就出现一个框. 求正确答案(我不知道有没有错误)有点急, 不知道怎么回事看电视声音小了 形容不知道怎么回事的词语 手机有时候振动不知道怎么回事 做的英语阅读理解也不少,但是还是错十一二个.不知道该怎么去总结错误.求总结方法、我也是按人家说的先看题在去阅读,但看完题目在去阅读的时候就基本上忘了刚才看的题目都有什么了, 用c 计算三角形面积不知道怎么回事,运行后输出的是错误的数据,求教.#include#include#includeint main(void){float a,b,c,s,area,perimeter;scanf(%f,%f,%f,&a,&b,&c); s=1.0/2*(a+b+c);area=sqrt(s*(s-a)*(s-b)*(s-c));perimeter=a+b+c 细胞内的遗传物质是DNA还是RNA?我做到一道题目,我觉得是DNA和RNA都有,但是答案只有DNA,不知道是答案错误还是我错误.请知情人士为我解答一下, 求50个作文的题目!不知道些啥啊!求50个作文的题目!不知道些啥啊! 有一个NOIP题目,我大部分都对了.可是有一个冒泡排序错误,NOIP20071.统计数字(count.pas/c/cpp)【问题描述】某次科研调查时得到了n 个自然数,每个数均不超过1500000000(1.5*109).已知不相同的数不 下列指令中不影响 标志位CY的指令有( )A、ADD A,20H B、CLR C 、RRC A D、INC A 帮我想一下写事记叙文,我不知道写什么.``定个题目来`记叙文哦`` 有没有了