自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 二叉树

头文件 #ifndef __BINTREE_H__ #define __BINTREE_H__ #define ElemType char typedef struct BinTreeNode { ElemType data; BinTreeNode *leftChild; BinTreeNode *rightChild; }BinTreeNode; typede...

2018-07-31 20:36:37 147

原创 队列:Queue

逻辑线性结构,先进先出FIFO;队列是两端出入数据,堆栈是单端出入数据; 入队列在队尾,出队列在队首; 头文件 Queue.h #ifndef _QUEUE_H_ #define _QUEUE_H_ typedef unsigned char boolean; #define DEFAULT 10 #define IN 1 #define OUT 0 template&lt...

2018-07-30 12:42:30 162

原创 栈:Stack

头文件 stack.h #ifndef __STACK_H__ #define __STACK_H__ #include<iostream> #include<assert.h> using namespace std; #define ElemType int #define STACK_INIT_SIZE 8 typedef struct Stack { ...

2018-07-29 18:54:47 243

原创 链表3.0

双层循环链表 头文件DCList.h #ifndef __DCLIST_H__ #define __DCLIST_H__ #include<iostream> #include<assert.h> using namespace std; #define ElemType int typedef struct ListNode { ElemType d...

2018-07-29 14:46:13 118

原创 链表2.0

头文件 SList.h #ifndef __SLIST_H__ #define __SLIST_H__ #include"Utili.h" #include<assert.h> #define ElemType int typedef struct ListNode { ElemType data; struct ListNode *next; }ListNod...

2018-07-28 18:03:12 121

原创 链表

SList #include<iostream> #include<assert.h> using namespace std; #define ElemType int typedef struct ListNode { ElemType data; struct ListNode *next; }ListNode; typedef ListN...

2018-07-28 11:04:11 134

原创 顺序表2.0

顺序表 头文件: Utili.h #ifndef __UTILI_H__ #define __UTILI_H__ #include<iostream> using namespace std; #endif SeqList.h #ifndef __SEQLIST_H__ #define __SEQLIST_H__ #include"Utili.h" #include&...

2018-07-26 15:59:20 112

原创 编译器驱动程序

大多数编译器提供编译器驱动程序,它代表用户在需要时调用语言处理器、编译器、汇编器和构造器 驱动程序首先运行C预处理器(cpp),它将C的源程序eg.c翻译成一个ASCII码的中间文件eg.i cpp [other arguments] eg.c eg.i 接下来,驱动程序运行C编译器(cc1),它将eg.i翻译成一个ASCII汇编语言文件eg.s cc1 eg.i -0g [oth...

2018-07-25 22:00:41 648

原创 利用多继承计算程序员工资(抽象类编程)

C++中没有接口的概念,C++类中科院使用纯虚函数实现接口,接口类中只有函数原型定义,没有任何数据的定义。 #include<iostream> using namespace std; class programer { public: virtual void getmoney()=0; }; class dijiprogramer:public programer ...

2018-07-24 15:07:38 465

原创 多态

#include<iostream> using namespace std; class FirstHero { public: virtual int power() { return 10; } private: }; class Devil { public: int power() { return ...

2018-07-23 17:57:32 121

原创 C++的运算符重载

编译器给提供了一种机制,让用户自己去完成自定义类型的加减操作,这个机制就是运算符重载 运算符重载的本质是一个函数!函数!函数! 语法为:类型 类名::operatro op(参数) 写的时候先写operator,然后在写后边的操作,比方说<,> ,= ,!=,==,<<,>>这样,之后写()里的内容,比方说你对运算符+号进行重载,然后你可以是一个类的对象,...

2018-07-21 21:15:44 134

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除