01 2016 档案

摘要:#include <stdio.h> #include <stdlib.h> #include <process.h> #include <Windows.h> void run1(void *p) { MessageBox(0, L"1", L"1", 0); } void run2(void * 阅读全文
posted @ 2016-01-30 09:38 喵小喵~ 阅读(434) 评论(0) 推荐(0)
摘要:#include <iostream> using namespace std; int add(int a, int b) { return a + b; } int(*op())(int a, int b)//函数指针的参数在后面,里面括号是这个函数的参数 { return add; } voi 阅读全文
posted @ 2016-01-29 21:22 喵小喵~ 阅读(217) 评论(0) 推荐(0)
摘要:#include #include void main(){ int **pp = (int **)malloc(sizeof(int *)* 5); int num = 0; for (int i = 0; i < 5; i++) { pp[i] = (int... 阅读全文
posted @ 2016-01-24 16:37 喵小喵~ 阅读(408) 评论(0) 推荐(0)
摘要:hWnd = CreateWindow(szWindowClass, szTitle, WS_SYSMENU | WS_MINIMIZEBOX,//不可最大化 500, 200,X_SIZE+18, Y_SIZE+18, NULL, NULL, hInstance, NULL);//50... 阅读全文
posted @ 2016-01-20 16:25 喵小喵~ 阅读(205) 评论(0) 推荐(0)
摘要://1.设置窗口大小MoveWindow(hWnd, 300, 200, 700 + 6, 600 + 28, FALSE);//放在InitInstance用于设置位置与窗口大小//传递句柄就可以绘图//2.双缓冲绘图模式void cDefense::DrawAll(){ HDC hDc =... 阅读全文
posted @ 2016-01-19 16:11 喵小喵~ 阅读(181) 评论(0) 推荐(0)
摘要:void cDefense::DrawAll(){ HDC hDc = GetDC(m_hWnd);//获取客户区窗口,如果该值为NULL,GetDC则获整个屏幕的窗口。 HDC dcMem = CreateCompatibleDC(hDc);//该创建一个与设备兼容的窗口 HBI... 阅读全文
posted @ 2016-01-18 13:57 喵小喵~ 阅读(920) 评论(0) 推荐(0)
摘要:#include int APIENTRY WinMain(HINSTANCE hinstance,HINSTANCE hpreinstance,LPSTR cmdline,int mcmdshow){ RegisterHotKey(NULL, 0x001, MOD_CONTROL, '1')... 阅读全文
posted @ 2016-01-18 11:46 喵小喵~ 阅读(133) 评论(0) 推荐(0)
摘要:1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 struct findInfo 9 {10 int *pstart;//首地址11 ... 阅读全文
posted @ 2016-01-17 20:32 喵小喵~ 阅读(343) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std;void main(){ string num1; string num2; cin >> num1; cin >> num2; int temp[200][200] = {0... 阅读全文
posted @ 2016-01-15 21:15 喵小喵~ 阅读(167) 评论(0) 推荐(0)
摘要:#include #include #define N 4void main(){ int a[N][N] = { 0 }; int data = 1; for (int i = 0; i k - 1)//减去一层 { a[i][j] ... 阅读全文
posted @ 2016-01-15 09:35 喵小喵~ 阅读(155) 评论(0) 推荐(0)
摘要://static.h#include #include #include #define N 100typedef struct stack{ int data[N]; int top;//标识栈顶}Stack;void init(Stack *p);//初始化int isEmpty(S... 阅读全文
posted @ 2016-01-15 08:40 喵小喵~ 阅读(165) 评论(0) 推荐(0)
摘要:#include #include int a[8] = { 1, 8, 2, 7, 3, 6, 4, 5 };const int* p[8] = { a, a + 1, a + 2, a + 3, a + 4, a + 5, a + 6, a + 7 };void main(){ for (int... 阅读全文
posted @ 2016-01-08 20:38 喵小喵~ 阅读(1005) 评论(0) 推荐(0)
摘要:#include using namespace std;class Test{public : void print() { cout << "abcd" << endl;; } double test() { cout << "doubl... 阅读全文
posted @ 2016-01-08 10:27 喵小喵~ 阅读(477) 评论(0) 推荐(0)
摘要:int num = 10; double db = 120.3; void *p; p = &num; cout << *(int *)p << endl;//转换成int类型的指针,再取值 system("pause"); 阅读全文
posted @ 2016-01-07 14:56 喵小喵~ 阅读(183) 评论(0) 推荐(0)
摘要:_declspec (dllexport)void run(){ for(char *p = 0xae0000;p<0xae1000;p++)//决定步长保存地址每次前进1个字节 { int *px = p;//按int方式解析 ... 阅读全文
posted @ 2016-01-07 14:43 喵小喵~ 阅读(189) 评论(0) 推荐(0)
摘要://MyLayer.h#include "cocos2d.h"USING_NS_CC;class MyLayer : public CCLayer{public: static MyLayer* create(); bool init();};//MyLayer.cpp#include ... 阅读全文
posted @ 2016-01-06 20:29 喵小喵~ 阅读(343) 评论(0) 推荐(0)
摘要:void sort(int *a, int len){ for (int i = 0; i a[j + 1]) { a[j] = a[j] ^ a[j + 1]; a[j+1] = a[j] ^ a[j + 1... 阅读全文
posted @ 2016-01-05 16:04 喵小喵~ 阅读(144) 评论(0) 推荐(0)
摘要:import java.util.Arrays;public class sort { public static void main(String[] args) { // TODO 自动生成的方法存根 int[] a = {1,2,323,23,543,12,5... 阅读全文
posted @ 2016-01-05 15:58 喵小喵~ 阅读(196) 评论(0) 推荐(0)
摘要:#include #include void main(){ int a[3][4] = { { 1, 2, 3, 4 }, { 4, 23, 3, 3 }, { 6 } }; for (int i = 0; i < 3; i++) { for (int j = 0;... 阅读全文
posted @ 2016-01-05 15:34 喵小喵~ 阅读(204) 评论(0) 推荐(0)
摘要:#include #include #define N 10void main(){ int a[N][N] = { 0 }; for (int i = 0; i < N; i++) { for (int j = 0; j < i+1; j++) { if (j == 0 || i == j... 阅读全文
posted @ 2016-01-05 12:03 喵小喵~ 阅读(120) 评论(0) 推荐(0)
摘要:基类:CApplicationProtocol纯虚函数virtual bool applicationDidFinishLaunching() = 0;CCApplication继承于CCApplicationProtoco:int run();//调用applicationDidFinishLau... 阅读全文
posted @ 2016-01-04 17:44 喵小喵~ 阅读(156) 评论(0) 推荐(0)
摘要:#include #include void main(){ while (1) { HWND win = GetDesktopWindow();//获取桌面 HDC windc = GetWindowDC(win);//获取桌面的显示 HDC ... 阅读全文
posted @ 2016-01-04 15:23 喵小喵~ 阅读(329) 评论(0) 推荐(0)
摘要:#include #include DWORD WINAPI mymsg(LPVOID lp){ MessageBoxA(0, "hello", "China", 0); return 0;}void main(){ HANDLE hthread; DWORD threadi... 阅读全文
posted @ 2016-01-04 14:39 喵小喵~ 阅读(122) 评论(0) 推荐(0)
摘要:int *a;int b = 4;a= &b;//a:b的地址//*a 取b地址的值,为4//&a为指针变量的地址//*(&a)为指针变量储存的地址 即为aint **b = &a;//b为指针变量a的地址//*b为指针变量a所储存的地址//改变*b(指针变量所储存的地址)即改变了*b的值 阅读全文
posted @ 2016-01-02 23:17 喵小喵~ 阅读(198) 评论(0) 推荐(0)
摘要:#include //WINBASEAPI//BOOL//WINAPI//CreateProcessW(//_In_opt_ LPCWSTR lpApplicationName,//执行程序名称//_Inout_opt_ LPWSTR lpCommandLine,//命令行//_In_opt_ LP... 阅读全文
posted @ 2016-01-02 22:47 喵小喵~ 阅读(221) 评论(0) 推荐(0)
摘要:#include #include #include #include "detours.h"#pragma comment(lib,"detours.lib")//包含库文件int (*poldsystem)(const char * _Command) = system;int newsyste... 阅读全文
posted @ 2016-01-02 16:36 喵小喵~ 阅读(587) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 int a[10][10] = { 0 }; 8 9 void show(int a[][10]) 10 { 11 c... 阅读全文
posted @ 2016-01-02 13:24 喵小喵~ 阅读(142) 评论(0) 推荐(0)
摘要:#define _CRT_SECURE_NO_WARNINGS#include #include #include #include char strpath[256] = "E:\\杂乱test\\kaifang.txt";char savepath[256] = { 0 };void showl... 阅读全文
posted @ 2016-01-02 11:46 喵小喵~ 阅读(221) 评论(0) 推荐(0)
摘要:typedef unsigned long int NUM;#include using namespace std;NUM x;cout << typeid(x).name();//输出x的类型 阅读全文
posted @ 2016-01-01 23:43 喵小喵~ 阅读(235) 评论(0) 推荐(0)
摘要:int add(int a, int b){int wei = 0;int jinwei = 0;do{wei = a^b;//处理位加法jinwei = (a&b) << 1;a = wei;b = jinwei;} while (b != 0);return a;}两个数相加=两个数亦或(相当于... 阅读全文
posted @ 2016-01-01 23:35 喵小喵~ 阅读(228) 评论(0) 推荐(0)