文件名称:complex
介绍说明--下载内容均来自于网络,请自行研究使用
一、实验名称:Complex类的运算符重载
二、实验目的:这个实验题目的主要目的是让同学们掌握c++运算符重载的用法
三、实验内容:
编写一个Complex类,需要完成的运算符重载有:
(1) + :重载+,用来完成两个复数的加法;
(2) -:重载-,用来完成两个复数的减法;
(3) *:重载*,用来完成两个复数的乘法;
(4) <<:重载<<,用来输出一个复数,输出的格式为(a + b * i),其中a为实部,b为虚部。-First, the experiment name: Complex class operator overloading Second, the purpose of the experiment: The main objective of the experimental subject is to enable students to grasp c++ operator overloading usage of three experimental content: write a Complex class, complete operator overloading are: (1 ) PPLS: PPLS overloaded, used to complete the addition of two complex numbers (2)-: overloaded- for performing subtraction of two complex numbers (3)*:* overloaded for performing two complex multiplication (4) < < : < < overloaded, the output format is used (a+ b* i), where a is the real part, b is the imaginary part of a complex number output.
二、实验目的:这个实验题目的主要目的是让同学们掌握c++运算符重载的用法
三、实验内容:
编写一个Complex类,需要完成的运算符重载有:
(1) + :重载+,用来完成两个复数的加法;
(2) -:重载-,用来完成两个复数的减法;
(3) *:重载*,用来完成两个复数的乘法;
(4) <<:重载<<,用来输出一个复数,输出的格式为(a + b * i),其中a为实部,b为虚部。-First, the experiment name: Complex class operator overloading Second, the purpose of the experiment: The main objective of the experimental subject is to enable students to grasp c++ operator overloading usage of three experimental content: write a Complex class, complete operator overloading are: (1 ) PPLS: PPLS overloaded, used to complete the addition of two complex numbers (2)-: overloaded- for performing subtraction of two complex numbers (3)*:* overloaded for performing two complex multiplication (4) < < : < < overloaded, the output format is used (a+ b* i), where a is the real part, b is the imaginary part of a complex number output.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
complex\complex\bin\Debug\complex.exe
.......\.......\complex.cbp
.......\.......\complex.cpp
.......\.......\complex.depend
.......\.......\complex.h
.......\.......\complex.layout
.......\.......\ComplexTest.cpp
.......\.......\obj\Debug\complex.o
.......\.......\...\.....\ComplexTest.o
.......\实验报告.doc
.......\complex\obj\Debug\C\Users\Administrator\Desktop\课件\C++\第五次作业
.......\.......\...\.....\.\.....\.............\.......\....\C++
.......\.......\...\.....\.\.....\.............\.......\课件
.......\.......\...\.....\.\.....\.............\Desktop
.......\.......\...\.....\.\.....\Administrator
.......\.......\...\.....\.\Users
.......\.......\...\.....\C
.......\.......\bin\Debug
.......\.......\obj\Debug
.......\.......\bin
.......\.......\obj
.......\complex
complex