- 博客(5)
- 收藏
- 关注
原创 日期类的一些基本操作
在代码可以复用的时候尽量使用复用,这样可以增强可读性,也降低出错率。 #include #include #include using namespace std; class Date { private: int _year; int _month; int _day; public: Date(int year = 1990,int month = 1,int day
2015-12-01 20:06:38 224
原创 日期计算器的实现
#include #include #include using namespace std; class Date { private: int _year; int _month; int _day; public: void GetDate() { cin>>_year>>_month>>_day; } int GetRightDay() { int arr
2015-12-01 20:03:57 462
原创 对复数类的一些基本定义
#include #include using namespace std; class Complex{ private: int _real; int _image; public: Complex(double real = 0.0,double image = 0.0) :_real(real),_image(image) { } void print() {
2015-12-01 18:14:18 641
原创 判断两个链表是否交叉,不考虑有环的情况
#include #include typedef struct List{ int data; struct List *next; }List; List* Create_node(int x) { List* tmp; tmp = (List *)malloc(sizeof(int)); tmp->data = x; tmp->next = NULL; return
2015-12-01 17:59:45 315
原创 判断一个单链表是否有环,如果有环求出环的入口点和环的长度
#include #include typedef struct List{ int data; struct List *next; }List; List* Create_node(int x) { List* tmp; tmp = (List *)malloc(sizeof(int)); tmp->data = x; tmp->next = NULL; return
2015-12-01 17:56:52 481
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人