自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 线性表链式存储实现

/**********头文件**********/#ifndef _SEQLIST_H_#define _SEQLIST_H_ typedef void LinkList;//typedef void LinkListNode;typedef struct _tag_LinkListNode{ struct _tag_LinkListNode* next;}

2017-01-17 15:35:21 362 1

原创 线性表顺序存储实现

/************头文件***********/#ifndef _SEQLIST_H_#define _SEQLIST_H_ typedef void SeqList;typedef void SeqListNode;//创建并且返回一个空的线性表SeqList* SeqList_Create();//销毁一个线性表void SeqList_De

2017-01-17 11:19:37 363

原创 STL案例_演讲比赛

#include using namespace std;#include #include #include #include #include #include #include #include class Speaker{public: string m_name; int m_score[3];};

2016-12-29 14:14:24 380

原创 C动态库实现模拟socket

/******************动态库文件********************/#define _CRT_SECURE_NO_WARNINGS#include #include #include typedef struct SCK_Handle{ char version[64]; char ip[128]; int port; unsig

2016-12-27 14:16:50 355

原创 框架类初探

//头文件 厂商1#pragma once#include "csocket.h"#include "iostream"using namespace std;class CSckFactory1 : public CSocket{public: //初始化 virtual int CSocketInit(); //发送 virtual int CSocketSend(un

2016-12-25 15:46:17 281

原创 用类定义数组及运算符重载

//头文件---类的定义及成员函数声明#include "iostream"using namespace std;class MyArray{public: MyArray(int len=0); MyArray::MyArray(const MyArray& obj); //拷贝构造函数 ~MyArray();public:

2016-12-23 15:00:30 922

原创 构造函数规则

#include "iostream"using namespace std;// 构造函数分为4大类:// 1、无参数构造函数// 2、有参数构造函数// 3、赋值构造函数(copy构造函数)// 4、默认构造函数class test{public:test(){m_a = 1; m_b = 2;cout }test(i

2016-12-22 16:11:39 356

原创 删除字符串空格

#include #include #include #include //去掉字符串中所有空格,返回新的字符串及字符串长度int str_DelSpace(const char *buf1, char*buf2, int *count){ const char *buf = buf1; char *tmp = buf2 ; *co

2016-12-07 17:11:49 275

原创 冒泡排序与选择排序

void swap(int *a, int *b)//交换数据{ int tmp = *a; *a = *b; *b = tmp;}void Bubble(int *a, int n)//冒泡排序:每一次排序过程,通过相邻元素的交换,将当前没有排好序中的最大元素移到数组的最后端{ int i, j; for(i = 0; i

2016-12-06 17:07:10 245

原创 QT编写简单的ide

/* 头文件*/#ifndef MAINWINDOW_H#define MAINWINDOW_H#include #include //qt已经帮我们写好了一个控件#include #include #include class MainWindow : public QMainWindow{ Q_OBJECTprivate:

2016-12-06 13:57:45 1270

转载 去重算法(转)

数组a[N],1至N-1这N-1个数存放在a[N]中,其中某个数重复一次。写一个函数,找出被重复的数字。时间复杂度必须为o(N)函数原型:int do_dup(inta[],int N) ××××××××××××××××××××××××××××××××××假金条的数学思想 此算法题借鉴了假金条的思想,不过比那个过程简单,存放1至N-1,就相当于依次从各个袋中取出1至N-1个

2016-12-06 12:18:09 1070

原创 文本文件排序

int calc_string(char *s)//字符串处理函数{    char buf1[100] = { 0 };    char oper = '0';    char buf2[100] = { 0 };    int len = strlen(s);    int i = 0;    for(i = 0; i     {        if

2016-12-06 12:16:16 873

原创 超大文件_堆空间_去重_排序

#include #include #include #include void swap(int *a, int *b)//交换数据{    int tmp = *a;    *a = *b;    *b = tmp;}void Bubble(int *a, int n)//冒泡排序{    int i, j;    f

2016-12-06 12:14:00 972

空空如也

空空如也

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

TA关注的人

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