自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 构造和析构 的顺序

#include <iostream>#include <stdlib.h>using namespace std;class B{public: B() { cout << "B()" << endl; } ~B() { cout << "~B()" << endl; } int m_b1; int...

2017-09-11 22:03:00 97

转载 继承中的隐藏概念

#include <iostream>#include <stdlib.h>using namespace std;class A{public: int age; void test() { cout << "A()" << endl; }};class B : public A{public: int age; void ...

2017-09-11 22:01:00 120

转载 异常

#include <iostream>#include <stdlib.h>#include <string>using namespace std;char GetChars(string &str, const int nStrIndex){ if (nStrIndex > (int)str.size()) { throw...

2017-09-11 22:00:00 112

转载 c#学习随笔

1 using System; //导入命名空间system中的类 2 using System.Collections.Generic; //导入System.Collections.Generic中的类 3 using System.Linq; 4 using System.Text; 5 using S...

2017-06-16 14:48:00 133

转载 C++随笔

1 #include <windows.h> 2 #include <iostream> 3 #include <stdio.h> 4 #include <string> 5 #include <cstring> 6 #include <cctype> 7 8 #i...

2017-06-15 09:40:00 130

转载 自己看看

1 #include <Windows.h> //默认写在最上方 2 #include <iostream> //输入输出流 3 #include <locale.h> //宽字符 显示的头文件 ,以及函数 setlocale(LC_ALL,""); 4 5 #includ...

2017-06-12 17:23:00 298

转载 数组名和指针

const int sz = 10; int arr[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; auto pBegin = begin(arr); auto pEnd = end(arr); while (pBegin != pEnd) { cout <<...

2017-06-09 11:44:00 79

转载 8.链表 --最简单的链表

/*  最常用的数据结构是数组,其次是链表  数组的缺点是:插入和删除的时候内存开销大,因为元素需要移动  链表的插入速度非常快,元素不需要移动    1.数据域    2.链接域*/#include <windows.h>#include <iostream>#include <stdio.h>...

2017-06-07 15:24:00 141

转载 对象成员数据的存放

1 #include <iostream> 2 using namespace std; 3 4 class TestObject 5 { 6 public: 7 TestObject() 8 { 9 x = 10;10 y = 20;11 z = 30;12 ...

2017-06-07 09:43:00 92

转载 7递归二分和迭代二分

1 /* 2 递归二分查找_I 3 迭代二分查找_R 4 5 */ 6 7 8 #include "BinarySearch_I_and_R.h" 9 #include <iostream> 10 using namespace std; 11 int BinarySearch_I(int ...

2017-05-05 15:16:00 92

转载 6递归

1 /* 2 递归函数: 3 函数自己调用自己就叫递归函数 4 递归可以实现循环 5 递归是神,迭代是人(迭代=循环) 6 缺点:需要暂存大量的数据,递归次数太多会占用大量内存空间 7 8 递归和迭代的区别 9 迭代是循环结构10 递...

2017-05-05 14:50:00 146

转载 5.二分查找 = 折半查找

1 /* 2 折半查找 = 二分查找 3 2的n次数 = m ,那么在m个数据中,查找1个数据,只需要n次 4 5 效率非常高,对于海量数据非常高效 6 7 前提是: 该数组已经排序过了 8 */ 9 10 11 12 #include "BinarySearch.h"13 ...

2017-05-05 10:59:00 190

转载 4.线性查找 = 顺序查找

1 /* 2 顺序查找: 3 速度慢 4 如果数据没有排序,那么查找起来会相当的费事,平均 nLen/2 次数查找 5 6 当可以排序的时候就可以使用改进方法( 折半查找 = 二分查找 ) ... 否则就是耗时也只能用顺序查找了 7 8 */ 9 #include "SequentSearch.h...

2017-05-05 09:55:00 121

转载 3选择排序

1 /* 2 选择排序 3 在冒泡排序的基础上改进 4 在未排序的里面找出最小的 5 6 7 选择排序和冒泡排序的区别,选择排序每次只交换一次,冒泡排序可能要交换多次 8 所以,选择排序比冒泡排序效率高些 9 10 */11 12 #include "Select.h"...

2017-04-28 21:36:00 98

转载 2.冒泡排序----还是不懂,先记录下来

1 /* 2 冒泡排序: 效率很低,速度慢...不适合大量数据排序 3 4 原理:从左向右扫描数据,选择交大的数据,放在右边,进行交换 5 关于i和j的说明 6 */ 7 #include "Bubble.h" 8 #include <stdio.h> 9 #include <iostre...

2017-04-27 23:12:00 104

转载 1交换算法

1 //交换算法 2 3 #include "swap.h" 4 #include <stdio.h> 5 #include <iostream> 6 7 8 using namespace std; 9 #define swap_m(x,y,t) ((t)=(x),(x)=(y),(y)=(t)) ...

2017-04-26 23:49:00 138

转载 调试篇

--------------------------------------------调试篇错误类型: 编译错误:通常都是语法错误 运行错误:比如分母是0提示报错的时候: 1.双击提示信息可以直接定位到报错的行 2.从上到下的调试程序,因为后面的报错是有可能是因为前面的报错而引起的连锁反应Bug:错误,漏洞Debug:是找出错误,调式描述问题的3要素: 1.前提条件是什么 ...

2016-09-17 23:35:00 74

空空如也

空空如也

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

TA关注的人

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