为什么编译时说xi和yi都是未说明的标识符,
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/13 10:16:15
为什么编译时说xi和yi都是未说明的标识符,
#include
using namespace std;
class imaginary
{
public:
\x05 imaginary(double a,double b)
\x05 {
\x05\x05 x=a;
\x05\x05 y=b;
\x05 }
\x05 friend imaginary add(imaginary &i1,imaginary &i2);
\x05 friend imaginary sub(imaginary &i1,imaginary &i2);
\x05 friend imaginary mul(imaginary &i1,imaginary &i2);
\x05 friend imaginary dev(imaginary &i1,imaginary &i2);
\x05 void show();
private:
\x05 double x,y,xi,yi;
};
imaginary add(imaginary &i1,imaginary &i2)
\x05 {
\x05\x05 i1.xi =i1.x+i2.x;
\x05\x05 i1.yi =i2.y+i1.y;
return i1;
\x05 }
\x05 imaginary sub(imaginary &i1,imaginary &i2)
\x05 {
\x05\x05 i1.xi=i1.x-i2.x;
\x05\x05 i1.yi=i1.y-i2.y;
\x05return i1;
\x05 }
\x05 imaginary mul(imaginary &i1,imaginary &i2)
\x05 {
\x05\x05 i1.xi=i1.x*i2.x-i1.y*i2.y;
\x05\x05 i1.yi=i1.x*i2.y+i1.y*i2.x;
\x05return i1;
\x05 }
\x05 imaginary dev(imaginary &i1,imaginary &i2)
\x05 {
\x05\x05 i1.xi=(i1.x*i2.x+i1.y*i2.y)/(i2.x*i2.x+i2.y*i2.y);
\x05\x05 i1.yi=(i1.y*i2.x-i1.x*i2.y)/(i2.x*i2.x+i2.y*i2.y);
return i1;
\x05 }
\x05 void show(){
\x05 if(yi
#include
using namespace std;
class imaginary
{
public:
\x05 imaginary(double a,double b)
\x05 {
\x05\x05 x=a;
\x05\x05 y=b;
\x05 }
\x05 friend imaginary add(imaginary &i1,imaginary &i2);
\x05 friend imaginary sub(imaginary &i1,imaginary &i2);
\x05 friend imaginary mul(imaginary &i1,imaginary &i2);
\x05 friend imaginary dev(imaginary &i1,imaginary &i2);
\x05 void show();
private:
\x05 double x,y,xi,yi;
};
imaginary add(imaginary &i1,imaginary &i2)
\x05 {
\x05\x05 i1.xi =i1.x+i2.x;
\x05\x05 i1.yi =i2.y+i1.y;
return i1;
\x05 }
\x05 imaginary sub(imaginary &i1,imaginary &i2)
\x05 {
\x05\x05 i1.xi=i1.x-i2.x;
\x05\x05 i1.yi=i1.y-i2.y;
\x05return i1;
\x05 }
\x05 imaginary mul(imaginary &i1,imaginary &i2)
\x05 {
\x05\x05 i1.xi=i1.x*i2.x-i1.y*i2.y;
\x05\x05 i1.yi=i1.x*i2.y+i1.y*i2.x;
\x05return i1;
\x05 }
\x05 imaginary dev(imaginary &i1,imaginary &i2)
\x05 {
\x05\x05 i1.xi=(i1.x*i2.x+i1.y*i2.y)/(i2.x*i2.x+i2.y*i2.y);
\x05\x05 i1.yi=(i1.y*i2.x-i1.x*i2.y)/(i2.x*i2.x+i2.y*i2.y);
return i1;
\x05 }
\x05 void show(){
\x05 if(yi
将void show(){
\x05 if(yi
\x05 if(yi
xi+yi
中间有 a yi xi dai yi lu a yi xi dai yi lu 女声,声音很纯的 安静的歌
求 ∑(xi-x)(yi-y),∑(xi-x)平方,∑(yi-y)平方 在excel里的公式.
144叶第2题 C语言中允许用外部说明来制定变量,函数和其他标识符的特征,这里所说的外部指的是
英语翻译书上说“用编译型高级语言编写的源程序必须经过编译和连接才能由机器执行.”请问这里所说的“连接”是什么意思?我记得
英语翻译A B 编译和汇编 C 编译和链接 D A 为什么?
若程序中有下面的说明和定义,则会发生的情况是编译出错.
excel ∑求和 ∑(n-i)(xi-yi) i=1到n xi和yi位已知变量,请问怎么求和?
为什么说导体和绝缘体都是重要的电工材料
n开头的英文单词不能超过4个字母,越简单越好,各位好心的姐姐和哥哥,偶曾滴有急用啦,o ne gai yi xi ma
java编译时,说'class' or 'interface' expected,expected是什么意思?
英语翻译两个人的对话,A:wo deng ni yi zhi yi zhi deng xia qu xi wang ni