01 2018 档案

摘要:运行截图: 链表快速排序原理: 链表定义 struct LinkNode { int data; struct LinkNode *pNext; }; typedef struct LinkNode node; 尾部添加节点 void addback(node **phead, int data) 阅读全文
posted @ 2018-01-31 18:36 喵小喵~ 阅读(326) 评论(0) 推荐(0)
摘要:string.h string.cpp array.h array.cpp main.c 运行截图: 总结:数组库有一个void类型的指针,可以指向很多数组,并控制数组.数组传递的是void类型,根据后面的参数进行转换,并分配内存. 阅读全文
posted @ 2018-01-29 22:02 喵小喵~ 阅读(266) 评论(0) 推荐(0)
摘要:运行结果: 1 #include 2 #include 3 #include 4 #define datatype int 5 6 struct array 7 { 8 datatype *pstart;//数组首地址 9 datatype length;//长度 10 datatype sortstate;//有序或... 阅读全文
posted @ 2018-01-29 12:01 喵小喵~ 阅读(162) 评论(0) 推荐(0)
摘要:原数据: 处理后的数据: 完整代码: 阅读全文
posted @ 2018-01-28 17:53 喵小喵~ 阅读(946) 评论(0) 推荐(0)
摘要:数据在linux和windows上是低字节在地位,高字节在高位,以此方法可以验证运行结果: 1 #include 2 #include 3 4 struct weiyu 5 { 6 unsigned char w0 : 1; 7 unsigned char w1 : 1; 8 unsigned char w2 : 1; 9 unsigne... 阅读全文
posted @ 2018-01-28 12:16 喵小喵~ 阅读(143) 评论(0) 推荐(0)
摘要:运行结果: 源代码: 阅读全文
posted @ 2018-01-27 15:52 喵小喵~ 阅读(585) 评论(0) 推荐(0)
摘要:1 //char 0-255一共256个 2 char getonebyhash(char *str) 3 { 4 if (str == NULL) 5 { 6 return '\0'; 7 } 8 char ch = '\0'; 9 //哈希表设置为0 10 int hashtable[256] = { 0 };... 阅读全文
posted @ 2018-01-27 15:14 喵小喵~ 阅读(139) 评论(0) 推荐(0)
摘要:mark 阅读全文
posted @ 2018-01-27 14:56 喵小喵~ 阅读(279) 评论(0) 推荐(0)
摘要:运行结果: 完整代码: 阅读全文
posted @ 2018-01-27 11:50 喵小喵~ 阅读(239) 评论(0) 推荐(0)
摘要:double类型转换到char* 1 char buffer[128]; 2 double value = 12.2345678; 3 _gcvt(value, 5, buffer);//5有效数字 4 printf("%s", buffer); unsigned int类型转换到char* 1 u 阅读全文
posted @ 2018-01-26 20:41 喵小喵~ 阅读(435) 评论(0) 推荐(0)
摘要:运行结果: 源代码: 阅读全文
posted @ 2018-01-26 17:01 喵小喵~ 阅读(181) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 5 //字符串中删除某一个字符 6 void deletech(char *str,char ch) 7 { 8 if (str == NULL) 9 { 10 return; 11 } 12 13 char *pstr = str; 14 w... 阅读全文
posted @ 2018-01-26 15:34 喵小喵~ 阅读(432) 评论(0) 推荐(0)
摘要:算法流程图: 执行截图: 完整代码: 阅读全文
posted @ 2018-01-26 14:45 喵小喵~ 阅读(1272) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 6 void myprintf(char *ptstr, ...)//可变参数 7 { 8 va_list ap;//起始点 9 va_start(ap, ptstr);//从ptstr开始向后读取数据存放在ap中 10 char flag;//依次读... 阅读全文
posted @ 2018-01-25 20:29 喵小喵~ 阅读(161) 评论(0) 推荐(0)
摘要:1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 #include 6 7 int exeshell(char *cmd, char *result)//传递指令,返回结果 8 { 9 FILE *pf = _popen(cmd, "r");//打开一个管道,用管道执行cm... 阅读全文
posted @ 2018-01-25 19:21 喵小喵~ 阅读(1010) 评论(0) 推荐(0)
摘要:memcpy 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <memory.h> 4 5 void * mymemcpy(void* _Dst, void const* _Src, size_t _Size) 6 { 7 if (_Dst 阅读全文
posted @ 2018-01-25 16:58 喵小喵~ 阅读(359) 评论(0) 推荐(0)
摘要:一、笛卡儿坐标系 OpenGl坐标系为笛卡儿右手系。x向右,y向上,z向外。在cocos2d-lua中坐标系原点在屏幕的左下角,x向右,y向上,z则是指的zorder(层级)。 二、世界坐标系,本地坐标系 世界坐标系的原点固定在屏幕的左下角。 本地坐标是和节点相关的坐标系,每个节点都有独立的坐标系, 阅读全文
posted @ 2018-01-25 14:27 喵小喵~ 阅读(359) 评论(0) 推荐(0)
摘要:1.首先头文件定义事件处理的函数原型 2.实现原型 3.绑定事件 阅读全文
posted @ 2018-01-25 11:58 喵小喵~ 阅读(234) 评论(0) 推荐(0)
摘要:CCLayerCorlor bool CCLayerColor::initWithColor(const ccColor4B & color); bool CCLayerColor::initWithColor(const ccColor4B & color, GLfloat w, GLfloat 阅读全文
posted @ 2018-01-25 10:54 喵小喵~ 阅读(147) 评论(0) 推荐(0)
摘要:T3LayerZorder.h 1 #pragma once 2 #include "cocos2d.h" 3 USING_NS_CC; 4 5 class T3LayerZorder:public CCLayer 6 { 7 public: 8 static CCScene *scene(); 9 阅读全文
posted @ 2018-01-25 10:27 喵小喵~ 阅读(159) 评论(0) 推荐(0)
摘要:红色代码处是一个宏定义: 等同于: 调用顺序:scene->create->init->scene 2.T2LayerSprite.cpp 运行截图: 阅读全文
posted @ 2018-01-25 10:07 喵小喵~ 阅读(381) 评论(0) 推荐(0)
摘要:T1LayerAnchorPoint.h 1 #pragma once 2 #include "cocos2d.h" 3 USING_NS_CC; 4 5 class T1LayerAnchorPoint:public CCLayer 6 { 7 public: 8 //create->init 9 阅读全文
posted @ 2018-01-24 18:36 喵小喵~ 阅读(202) 评论(0) 推荐(0)
摘要:创建一个层T1LayerAnchorPoint AppDelegate.cpp 1 bool AppDelegate::applicationDidFinishLaunching() { 2 // initialize director 3 auto director = Director::get 阅读全文
posted @ 2018-01-24 17:13 喵小喵~ 阅读(160) 评论(0) 推荐(0)
摘要:调用关系: AppDeligate.cpp 1 bool AppDelegate::applicationDidFinishLaunching() { 2 // initialize director 3 auto director = Director::getInstance(); 4 auto 阅读全文
posted @ 2018-01-24 16:30 喵小喵~ 阅读(178) 评论(0) 推荐(0)
摘要:单线程运行时间: 多线程运行时间; 代码: 阅读全文
posted @ 2018-01-24 12:15 喵小喵~ 阅读(1093) 评论(0) 推荐(0)
摘要:一.准备工作: sqlite3工具集:链接:https://pan.baidu.com/s/1mjufXZa 密码:2ui7 安装步骤: 2.添加sqlite3.exe的环境变量 这里是把sqlite3.exe放在C盘根目录,所以这样添加系统变量 添加好以后,打开cmd,输入sqlite3,如果出现 阅读全文
posted @ 2018-01-24 10:30 喵小喵~ 阅读(982) 评论(0) 推荐(0)
摘要:1.自己实现三个常用函数 strlen,strcpy,strstr 自己实现strstr函数,如果找到返回首地址,找不到则返回NULL 自己实现strlen函数 自己实现strcpy函数 2.字符串的排序以及自己实现strcmp 字符串的排序调用qsort 字符串的排序,冒泡法 自己实现strcmp 阅读全文
posted @ 2018-01-23 21:03 喵小喵~ 阅读(285) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 5 //随机初始化数组 6 void fill(int *a,int n) 7 { 8 time_t ts; 9 unsigned int num = time(&ts); 10 srand(num); 11 for (int i = 0; i *pint2) 37 ... 阅读全文
posted @ 2018-01-23 19:11 喵小喵~ 阅读(380) 评论(0) 推荐(0)
摘要:模拟代码进入过程: main.cpp 1 #include <iostream> 2 #include "AppDelegate.h" 3 #include "CCApplication.h" 4 #include "CCApplicationProtocol.h" 5 using namespac 阅读全文
posted @ 2018-01-23 17:47 喵小喵~ 阅读(277) 评论(0) 推荐(0)
摘要:1.Apache的安装 地址:链接:https://pan.baidu.com/s/1kWdSWwZ 密码:nuqo 2.在相应路径下写html如图所示 new.html代码: 3.cgi路径: cgi代码 运行效果: 点击post后: 阅读全文
posted @ 2018-01-23 16:20 喵小喵~ 阅读(192) 评论(0) 推荐(0)
摘要:运行截图: 阅读全文
posted @ 2018-01-20 14:44 喵小喵~ 阅读(128) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 4 //需要排序的数组 5 char str[10] = "123"; 6 7 //交换两个数据 8 void swap(char *p1, char *p2) 9 { 10 char tmp = *p1; 11 *p1 = *p2; 12 *p2 = tmp; 13 } 14 15 //全排列... 阅读全文
posted @ 2018-01-19 19:15 喵小喵~ 阅读(231) 评论(0) 推荐(0)
摘要:一、开发环境 开发环境 使用语言:C/C++ IDE:VS2010+ 其他三方库 EasyX(http://www.easyx.cn/downloads/) ADB(链接:https://pan.baidu.com/s/1ghjbm51 密码:v68m) ADB环境变量配置 打开adb文件夹,将此路 阅读全文
posted @ 2018-01-19 18:24 喵小喵~ 阅读(2899) 评论(2) 推荐(2)
摘要:运行截图: 代码: 阅读全文
posted @ 2018-01-19 16:53 喵小喵~ 阅读(390) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS #include #include #include #define path "1E~001.txt" char ** g_QQ;//存放在内存中的qq数据 int total_hang = 84357147;//标识一共多少行 int long_hang = 798;//标识有多少数据很长的数据 //读取一共有多少... 阅读全文
posted @ 2018-01-19 12:17 喵小喵~ 阅读(137) 评论(0) 推荐(0)
摘要:#include #include #include #include void run1(void *p) { MessageBoxA(0, "1", "1", 0); } void run2(void *p) { MessageBoxA(0, "2", "2", 0); } void run3(void *p) { MessageBoxA(0, "3",... 阅读全文
posted @ 2018-01-19 10:24 喵小喵~ 阅读(197) 评论(0) 推荐(0)
摘要:函数指针作为参数 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <Windows.h> 4 5 int add(int a, int b) 6 { 7 return a + b; 8 } 9 10 int sub(int a, int b 阅读全文
posted @ 2018-01-18 15:30 喵小喵~ 阅读(136) 评论(0) 推荐(0)
摘要:1 int a[3][4]; 2 int *p = (int[11]){ 0 }; 3 int(*px)[4] = (int[5][4]){ 0 }; 阅读全文
posted @ 2018-01-18 14:35 喵小喵~ 阅读(125) 评论(0) 推荐(0)
摘要:1 int *p = malloc(sizeof(int) * 10);//malloc不会初始化参数是整体大小 2 int *p = calloc(25, sizeof(int));//会初始化为0,参数第一个是个数,第二个是元素大小 3 void *px = relloc(p, 44);//拓展内存,如果后面内存够则返回原来地址, 4 ... 阅读全文
posted @ 2018-01-18 14:25 喵小喵~ 阅读(186) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS #include #include void main() { //创建一个二级指针指向4个一级指针 int **arr = (int **)malloc(sizeof(int *) * 4); //每个一级指针分配内存地址 for (int i = 0; i < 4; i++) {... 阅读全文
posted @ 2018-01-18 13:04 喵小喵~ 阅读(124) 评论(0) 推荐(0)
摘要:指针数组 数组的每一个元素都是地址,sizeof(p) = 40; 数组指针 数组的每一个元素都是一个数组的首地址,sizeof(p2) = 4; 实现不改变原来的数组元素位置来实现冒泡排序,使用指针数组 数组指针存储一个二维数组 阅读全文
posted @ 2018-01-18 10:07 喵小喵~ 阅读(124) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 4 // 自身的窗口句柄 父窗口句柄 命令 控制显示或者隐藏 5 int APIENTRY WinMain(HINSTANCE hinstance, HINSTANCE hpreinstance, LPSTR cmdline, in... 阅读全文
posted @ 2018-01-17 19:59 喵小喵~ 阅读(130) 评论(0) 推荐(0)
摘要:#include <locale.h> 阅读全文
posted @ 2018-01-17 18:27 喵小喵~ 阅读(238) 评论(0) 推荐(0)
摘要:在bool HelloWorld::init()中加入如下代码 项目截图 阅读全文
posted @ 2018-01-17 12:53 喵小喵~ 阅读(831) 评论(0) 推荐(0)
摘要:在class HelloWorld : public cocos2d::Layer中添加函数 实现: 在bool HelloWorld::init()中与按钮关联起来 截图: 阅读全文
posted @ 2018-01-17 11:57 喵小喵~ 阅读(118) 评论(0) 推荐(0)
摘要:queue.h main.cpp 阅读全文
posted @ 2018-01-17 10:37 喵小喵~ 阅读(297) 评论(0) 推荐(0)
摘要:运行截图: 阅读全文
posted @ 2018-01-16 17:49 喵小喵~ 阅读(151) 评论(0) 推荐(0)
摘要:写迷宫程序首先需要安装图形库easyX 安装地址链接:https://pan.baidu.com/s/1qZwFn3m 密码:ozge 项目截图: //左上角是七点,右下角是终点,蓝色表示的是走过的路径,红色表示的是当前位置,采用的是深度优先遍历 mg.h main.cpp 阅读全文
posted @ 2018-01-16 17:21 喵小喵~ 阅读(1136) 评论(0) 推荐(0)
摘要:Snake.h main.cpp 阅读全文
posted @ 2018-01-16 12:25 喵小喵~ 阅读(202) 评论(0) 推荐(0)
摘要:1 #pragma once 2 #include 3 #include 4 #include 5 #pragma comment(lib,"winmm.lib") 6 7 int main() 8 { 9 initgraph(WINDOW_HEIGHT,WINDOW_WIDTH);//初始化图形界面(窗口) 10 11 //设置背景颜色 12 ... 阅读全文
posted @ 2018-01-15 17:39 喵小喵~ 阅读(283) 评论(0) 推荐(0)
摘要:游戏界面设计 宏定义如下: 设置窗口大小和位置 1 BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) 2 { 3 HWND hWnd; 4 5 hInst = hInstance; // 将实例句柄存储在全局变量中 6 7 //改变窗口大小和位 阅读全文
posted @ 2018-01-14 12:50 喵小喵~ 阅读(292) 评论(0) 推荐(0)
摘要:1.stack.h 2.stack.c main.c 阅读全文
posted @ 2018-01-14 11:34 喵小喵~ 阅读(137) 评论(0) 推荐(0)
摘要:另一种方法实现多线程 多线程切割实现数值计算 阅读全文
posted @ 2018-01-13 15:54 喵小喵~ 阅读(140) 评论(0) 推荐(0)
摘要:Detours可以用来实现劫持,他是微软亚洲研究院开发出来的工具,要实现它首先需要安装Detours. 安装地址链接:https://pan.baidu.com/s/1eTolVZs 密码:uy8x 劫持自己 1 #include <stdio.h> 2 #include <stdlib.h> 3 阅读全文
posted @ 2018-01-13 10:46 喵小喵~ 阅读(214) 评论(0) 推荐(0)
摘要:程序员必读书单 1.0 发表于 2015-02-25 | 分类于 阅读 | 本文把程序员所需掌握的关键知识总结为三大类19个关键概念,然后给出了掌握每个关键概念所需的入门书籍,必读书籍,以及延伸阅读。旨在成为最好最全面的程序员必读书单。 前言 Reading makes a full man; co 阅读全文
posted @ 2018-01-07 14:11 喵小喵~ 阅读(294) 评论(0) 推荐(0)
摘要:1 //选择排序法 2 #include 3 #include 4 5 6 void main() 7 { 8 9 int a[10]; 10 //初始化数组 11 for (int i = 0; i a[j + 1]) 32 { 33 int tmp = a[j]; 34 ... 阅读全文
posted @ 2018-01-05 22:45 喵小喵~ 阅读(185) 评论(0) 推荐(0)
摘要://选择排序法 #include #include void main() { int a[10]; //初始化数组 for (int i = 0; i < 10; i++) { a[i] = rand() % 10; } //打印数组 for (int i = 0; i < 10; i++) { ... 阅读全文
posted @ 2018-01-05 21:25 喵小喵~ 阅读(194) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #define PI 3.14159 6 #define R 150 7 8 void main() 9 { 10 //获取窗口 11 HWND hnd = FindWindowA("TXGuiFoundation", "QQ"); 12 if (hnd... 阅读全文
posted @ 2018-01-05 17:42 喵小喵~ 阅读(197) 评论(0) 推荐(0)
摘要:第三章 控制语句 一、选择题 1. 以下语句中无限循环语句是 B 。 A)for(;2&5;); 10 101 //不是无限循环 B)while(1,2,3); 1,2,3 3 C)while(‘\0’); D)for(;’\0’;); '0' '\0' 0 // %d 48 0 0 //0,为空 阅读全文
posted @ 2018-01-04 09:27 喵小喵~ 阅读(2291) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 4 int add(int a, int b) 5 { 6 int sum, jinwei; 7 do 8 { 9 //没进位的加法结果 10 sum = a^b; 11 //求出总的进位 12 jinwei = (a&b) << 1; ... 阅读全文
posted @ 2018-01-03 19:13 喵小喵~ 阅读(123) 评论(0) 推荐(0)
摘要:1.dll文件: 2.调用dll文件 运行截图: 阅读全文
posted @ 2018-01-03 18:40 喵小喵~ 阅读(161) 评论(0) 推荐(0)
摘要:相关代码:链接:https://pan.baidu.com/s/1pKVVUZL 密码:e3vf 阅读全文
posted @ 2018-01-02 17:45 喵小喵~ 阅读(856) 评论(0) 推荐(0)
摘要:多字节模式下: CString -->char * 1 CString str1 ="123"; 2 char *t1 =str1.GetBuffer(str1.GetLength()); 3 str1.ReleaseBuffer(); char * -->CString CString -->in 阅读全文
posted @ 2018-01-02 17:30 喵小喵~ 阅读(554) 评论(0) 推荐(0)
摘要:移植到mfc: mfc代码: 链接:https://pan.baidu.com/s/1pLywkDd 密码:wm30 阅读全文
posted @ 2018-01-02 11:34 喵小喵~ 阅读(469) 评论(0) 推荐(0)
摘要:volatile 编译器会自动优化,而volatile起到的作用是禁止优化,每次读内存 阅读全文
posted @ 2018-01-01 22:02 喵小喵~ 阅读(121) 评论(0) 推荐(0)
摘要:1 #define _CRT_SECURE_NO_WARNINGS 2 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std; 10 11 void table_pic(void *p) 12 { 13 char path[100];... 阅读全文
posted @ 2018-01-01 20:28 喵小喵~ 阅读(180) 评论(0) 推荐(0)