- 博客(8)
- 收藏
- 关注
转载 实验六
1. 合并两个文件到新文件中。文件名均从键盘输入。 运行程序ex1.cpp,结合运行结果及源码中注释,理解和体会文件I/O的方法。// 合并两个文件内容到一个新文件中。// 文件名均从键盘输入#include <iostream>#include <fstream>#include <string>#include &l...
2019-06-17 15:47:00
103
转载 实验五
1.#include <iostream>#include <string>using namespace std;class MachinePets{ public: MachinePets(const string s):nickname(s){}; string getN...
2019-06-02 09:31:00
138
转载 实验四
1#ifndef CAR_H#define CAR_H#include<string> #include<iostream>using namespace std;class Car{ public: Car(string maker0,string model0,int year...
2019-05-19 16:47:00
80
转载 期中
1#include "date.h"#include "utils.h" #include <iostream>using std::cout;using std::endl;/*class Date { public: Date(); // 默认构造函数,将日期初始化为1970年1月1日 ...
2019-04-30 15:00:00
73
转载 实验三
Part2 基于已有信息,补足并扩充程序。 在graph文件夹里提供有三个文件: graph.h (类Graph的声明) graph.cpp (类Graph的实现) main.cpp (类Graph的测试: 定义Graph类对象,调用绘图接口绘制图形) 要求如下: 新建一个空项目,添加上述三个文件到项目中。 补足graph.h中类的成员函数draw()的实现,使得在main()中对类的测...
2019-04-21 01:41:00
130
转载 complex类
#include<cmath>using namespace std;class Complex{ public:Complex(float a,float b); Complex(float n); Complex(Complex &m); void add(Complex...
2019-03-31 10:06:00
110
转载 实验二
实验结论:1.函数重载编程练习编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型 数据,调用测试。#include<iostream>using namespace std;struct Complex{ double real; double imaginary;...
2019-03-23 21:05:00
153
转载 实验一
书P632-28(1)#include<iostream>using namespace std;int main(){ char select; while(1) {cout<<"Menu:A(dd) D(elete) S(ort) Q(uit),Select one:"; cin>>...
2019-03-17 02:36:00
64
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人