C++面向对象程序设计(谭浩强)部分题目答案
6ev
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
第4章 Teacher和Student 数据移植
#include<iostream> #include<string> using namespace std; class Student; class Teacher{ public: Teacher(int n,string str,char s):num(n),name(str),sex(s){ } void trans(Student &); ...原创 2018-06-22 19:44:44 · 451 阅读 · 0 评论 -
第4章 重载运算符 * 作复数乘法运算
#include<iostream> using namespace std; class Complex{ public: Complex(){real = 0;imag = 0;} Complex(double r,double i){real = r;imag = i;} friend Complex operator * (Complex &c1,Com...原创 2018-06-18 10:10:10 · 995 阅读 · 0 评论 -
第4章 重载运算符 / 作复数除法运算
#include<iostream> #include<math.h> using namespace std; class Complex{ public: Complex(){real = 0;imag = 0;} Complex(double r,double i){real = r;imag = i;} friend Complex operator...原创 2018-06-18 10:29:31 · 664 阅读 · 0 评论
分享