摘要: 冒泡排序的数组和向量实现 向量唯一化实现 向量-归并排序 阅读全文
posted @ 2019-03-09 16:51 Lightmonster 阅读(293) 评论(0) 推荐(0) 编辑
摘要: #include "pch.h" #include #include #include #include #include #include #include using namespace std; inline void eatline() { while (cin.get() != '\n') continue; } struct planet { char name... 阅读全文
posted @ 2019-03-07 21:12 Lightmonster 阅读(320) 评论(0) 推荐(0) 编辑
摘要: #include "pch.h" #include #include #include #include using namespace std; const int NUM = 26; const string wordlist[NUM] = { "apiary","beetle","cereal", "danger","ensign","florid","garage","heal... 阅读全文
posted @ 2019-03-03 20:27 Lightmonster 阅读(477) 评论(0) 推荐(0) 编辑
摘要: //头文件 #pragma once #ifndef SALES_H_ #define SALES_H_ #include <stdexcept> #include <string> class Sales { public: enum { MONTHS = 12 }; class bad_inde 阅读全文
posted @ 2019-03-02 22:11 Lightmonster 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 12-1 12-2 12-3 #pragma once #ifndef STOCK_H_ #define STOCK_H_ #include <string> using namespace std; class Stock { private: char* company; int shares; 阅读全文
posted @ 2019-03-01 15:42 Lightmonster 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 11-1 //headfile #pragma once #ifndef VECTOR_H_ #define VECTOR_H_ #include <iostream> namespace VECTOR { class Vector { public: enum Mode { RECT, POL } 阅读全文
posted @ 2019-02-28 16:32 Lightmonster 阅读(234) 评论(0) 推荐(0) 编辑
摘要: #pragma once #ifndef WORKRMI_H_ #define WORKRMI_H_ #include using namespace std; class Worker { private: string fullname; long id; protected: virtual void Data() const; virtual void ... 阅读全文
posted @ 2019-02-26 20:39 Lightmonster 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 头文件 类方法实现文件 主函数调用类 IDE:VS2017 阅读全文
posted @ 2019-02-22 17:40 Lightmonster 阅读(581) 评论(0) 推荐(0) 编辑
摘要: cin.clear()是用来更改cin的状态标识符的。 cin.sync()是用来清除缓冲区的数据流的。 如果标识符没有改变那么即使清除了数据流也无法正常输入,反之亦然,因此两者要联合起来使用。下面是一个使用的例子: cin.ignore(a,ch) 从输入流(cin)中提取字符,提取的字符被忽略, 阅读全文
posted @ 2019-02-18 21:58 Lightmonster 阅读(1003) 评论(0) 推荐(0) 编辑
摘要: 10-1 10-2 10-6 10-7 10-8 阅读全文
posted @ 2019-02-18 21:43 Lightmonster 阅读(228) 评论(0) 推荐(0) 编辑