摘要: 在pycharm中安装包的时候可以依赖这些镜像源。 不然速度太慢,甚至超时。 下面是国内常用源镜像地址: 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 htt 阅读全文
posted @ 2020-11-29 00:58 Joey_Yan 阅读(860) 评论(0) 推荐(0)
摘要: 1. #include<iostream> #include<fstream> #include<string> #include<cstdlib> using namespace std; int main(){ string filename; cout << "输入打开的文件: "; cin 阅读全文
posted @ 2019-06-12 21:36 Joey_Yan 阅读(98) 评论(0) 推荐(0)
摘要: 第一题和第二题的源代码老师都写好了,所以就不放了。 直接第三题,代码如下: #include<iostream>#include<string>using namespace std; //抽象类MachinePets class MachinePets{ public: MachinePets() 阅读全文
posted @ 2019-06-02 13:23 Joey_Yan 阅读(81) 评论(0) 推荐(0)
摘要: 1.代码如下: #ifndef CAR_H #define CAR_H #include<string> using std::string; class Car{ private: string maker; string model; int year; int odometer; public 阅读全文
posted @ 2019-05-16 19:59 Joey_Yan 阅读(129) 评论(2) 推荐(0)
摘要: 1. #include "date.h" #include "utils.h" #include <iostream> using std::cout; using std::endl; // 补足程序,实现Date类中定义的成员函数 /*#ifndef DATE_H #define DATE_H 阅读全文
posted @ 2019-04-30 14:57 Joey_Yan 阅读(127) 评论(0) 推荐(0)
摘要: 1.新建一个空项目,添加上述三个文件到项目中。 补足graph.h中类的成员函数draw()的实现,使得在main()中对类的测试能够实现以下效果: 主函数中测 试代码 代码如下: //定义一个graph的类 #ifndef GRAPH_H #define GRAPH_H class Graph{ 阅读全文
posted @ 2019-04-21 14:42 Joey_Yan 阅读(94) 评论(0) 推荐(0)
摘要: 源代码: #include<iostream> #include<cmath> using namespace std; class complex{ public: complex(double a=0, double b=0); //构造函数 complex(complex &c); //复制构 阅读全文
posted @ 2019-03-31 13:09 Joey_Yan 阅读(105) 评论(1) 推荐(0)
摘要: 1.编写重载函数add(),实现对int型,double型,Complex型数据的加法。在main()函数中定义不同类型 数据,调用测试。 代码如下: #include<iostream> using namespace std; struct Complex{ double real; doubl 阅读全文
posted @ 2019-03-24 14:18 Joey_Yan 阅读(216) 评论(4) 推荐(0)
摘要: 2-28 (1)用if else 语句 #include<iostream> using namespace std; int main(){ char alphabet; while (true) { cout << "Menu : A(dd) D(elete) S(ort) Q(uit) , S 阅读全文
posted @ 2019-03-16 19:43 Joey_Yan 阅读(125) 评论(2) 推荐(0)