自定义博客皮肤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)
  • 问答 (1)
  • 收藏
  • 关注

原创 1

#include using namespace std;class point{private: int x, y;public: point(){} point(int x, int y) { this->x = x; this->y = y; } ///void operator++ (int)

2016-11-25 21:52:42 192

原创

/*#include #includeusing namespace std;typedef struct arcnode{ int weight; int adjvex; arcnode *nextarc;}arcnode;typedef struct vnode{ int data; arcnode *firstarc;}Adjvex

2016-11-25 21:15:59 244

原创 deep copy and shallow copy

///在有指针的情况下,浅拷贝只是增加了一个指针指向已经存在的内存,///而深拷贝就是增加一个指针并且申请一个新的内存,使这个增加的指针指向这个新的内存,///采用深拷贝的情况下,释放内存的时候就不会出现在浅拷贝时重复释放同一内存的错误!///举个栗子///最能体现深层拷贝与浅层拷贝的,就是‘=’的重载。#include#includeusing namespace std;cl

2016-11-23 21:55:02 213

原创 dynamic memory allocation

/// dynamic memory allocation#include #includeusing namespace std;class baseDMA{private: char *label; int rating;public: baseDMA(const char *l = "null", int r = 0); baseDMA(con

2016-11-23 21:04:14 479

原创 链栈 链队列 share

发现自己好像越来越low了 没四儿 开心就好///链栈#include using namespace std;typedef struct node///几种不同的打包方式 自己总是糊里糊涂的 多看看吧{ int data; node *next; node *top;}LinkStack;//typedef struct{ node *

2016-11-22 19:05:10 290

原创 邻接表实现prim

///*******linjiebiao*************************#include#include#includeusing namespace std;const int inf = 65535;typedef struct arcnode{///存边 int adjvex; int weight; arcnode *nextarc;

2016-11-16 20:44:23 1821

原创 三叉链表实现二叉树基本操作

#include#include#includeusing namespace std;int head, tail;typedef struct treenode{ char data; treenode *lchild; treenode *rchild; treenode *parent;}node, *Tree;node *q[100];

2016-11-15 21:01:45 2799

原创 先序 中序 后序 线索二叉树

///有头结点版 + 无头结点版 啊啊啊啊啊啊 感觉自己快吐血了 T^T#include#includeusing namespace std;typedef struct treenode{ char data; treenode *lchild; treenode *rchild; int LTag; int RTag;}node, *

2016-11-13 20:44:03 815

原创 继承与派生

///刚看了继承和派生 感觉懵懵哒~///13.1 简单的基类/*#include #includeusing namespace std;class TableTennisPlayer{private: enum{LIM = 20}; char firstname[LIM]; char lastname[LIM]; bool hasTable;pu

2016-11-12 20:16:45 221

原创 哈夫曼树

///本想着复习一下 二叉树就学哈夫曼的 呵呵哒 复习就用了一晚上 这效率也是没谁了///都粘上。。。/*#include#includeusing namespace std;const int maxn = 100;int n = 0, m = 0;typedef struct treenode{ char data; treenode *lchild;

2016-11-10 20:26:46 389

原创 二叉搜索树的创建 查找 删除

///此处省去概念若干字~ 欢迎指错#include #includeusing namespace std;typedef struct treenode{ int data; treenode *lchild; treenode *rchild;}node;int flag = -1;void insert_node(node* root, node*

2016-11-01 15:22:39 418 1

空空如也

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

TA关注的人

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