代码片段(01):.指针.c+02.间接赋值.c

内容概要:内存

  1. ///01.指针
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. //01.取地址操作符(&)详解:
  5. // 1.操作对象:变量名(实质:内存实体|数据实体)
  6. // 2.操作特点:属于寄存器操作(操作结果不是内存实体)
  7. // (1).取地址操作(&变量名)是在CPU的寄存器区域所完成的操作;
  8. // (2).地址数据不占用内存,内存地址是在CPU核心构成组件寄存器产生的,
  9. // 内存地址的数值和内存存储没有实质关系;
  10. // 3.计算机地址总线:连接CPU与硬件内存的总线
  11. // (1).总线数目与CPU位数+操作系统位数有关
  12. // (2).地址数值作为一个常量恒久不变
  13. // (3).地址作为产量恒值并不会占用内存
  14. // 内存地址是在CPU的寄存器当中产生的,因此不具备内存实体,也就不会占用内存
  15. // (4).总线的个数决定者位数的不同:
  16. // 32条总线对应于32位操作系统;64条总线对应于64位操作系统
  17. //02.对指针变量的解释:
  18. // P一个指针变量,用于存储普通变量的地址数值,然后通过操作指针变量的方式间接操作普通变量
  19. //03.对于指针所占用的字节数分析:
  20. // Win32平台所编译的程序的指针类型占用4个字节
  21. // Win64平台所编译的程序的指针类型占用8个字节
  22. int main01(void)
  23. {
  24. int num = 10;
  25. int data = 20;
  26. //P是一个指针变量,可以存储相同类型的不同变量的内存地址,常用于做间接访问变量本身(内存实体)操作
  27. int * pNum = &num;//0x12312312
  28. int * pData = &data;
  29. printf("%d \n", sizeof(pNum));//指针变量所占用的内存尺寸为4个字节(Win3平台所编译的程序)
  30. printf("%p \n", pNum);//直接打印指针变量(pNum)的数值,相当于间接打印了普通变量(num)的地址
  31. printf("%p \n", &pNum);//表示获取"指针"变量的地址,类型为int **
  32. system("pause");
  33. }
  34. //04.指针变量内容详解:
  35. // 1.类型:
  36. // 既决定了内存实体步长,也决定了内存实体解析方式
  37. // 2.数值:
  38. // 就是一个地址数值
  39. // 3.场景:(携带*号的情况)
  40. // 赋值号左边:
  41. // 给内存实体写入数据
  42. // 赋值号右边:
  43. // 从内存实体读取数据
  44. int main02(void)
  45. {
  46. int num1 = 1100;
  47. int num2 = 1200;//变量num都分配了内存,内存实体(数据实体)的数值代表变量的数据
  48. int * pNum = &num1;//pNum1是int类型的一级指针变量,&num1是一级指针真常量数值(含有类型含义)
  49. pNum = &num2;//pNum的值是num2这个变量(内存实体|数据实体)的内存地址,该内存地址统一占用4个字节,int * 地址,指针变量的长度统一为4
  50. //int * 对称于pNum,指针类型既决定了内存实体的访问字节步长,也决定了内存实体的解析方式,特殊点:浮点型数据的特殊存储形式,既是指数形式存储还涉及到无符号类型(存储实质阶码)
  51. *pNum = 12;//通过指针变量间接的访问了普通变量的内存实体//根据指针数值找到内存地址,根据指针类型既决定了存储步长也决定了存储方式
  52. printf("%p \n", &pNum);//&pNum表示获取一级指针变量pNum的内存地址,该地址数值存储于CPU核心组件寄存器区域,完全不会占用内存存储
  53. printf("%d \n", num2);
  54. printf("num2 = %d \n", num2);
  55. system("pause");
  56. }
  57. //05.野指针:就是没有进行初始化操作的指针变量
  58. // VC:编译检测,GCC编译不检测
  59. //06.解析方式的不同含义:
  60. // 有无符号:signed/unsigned
  61. // 存储原理:补码原理/阶码原理
  62. //07.指针变量所占用的内存尺寸只跟编译平台有关:
  63. // Win32平台:4字节-->Win64平台:8字节
  64. int main03(void)
  65. {
  66. //int * p;//没有对象的野指针,定义指针变量的时候必须进行指针变量的初始化操作
  67. //printf("%p \n", p);//打印指针变量当中所存储的内存地址-->编译不通过
  68. //解析方式的不同特点:
  69. // signed/unsigned(只针对于10进制的整数)+float指数形式存储(阶码实质存储)
  70. int num1 = 10;
  71. int num2 = 20;
  72. //float * pNum;
  73. //pNum = &num1;
  74. //printf("%f", *pNum);//指针变量的类型决定了指针变量对其所存储的地址数值的解析步长(字节尺寸)以及解析方式(补码阶码)
  75. int * pNum;
  76. pNum = &num1;
  77. printf("%d \n", *pNum);//对内存地址数值的正确解析步长和正确解析方式
  78. printf("%d \n", sizeof(pNum));//指针变量所占用的字节长度在Win32平台之下统一占用4个字节的内存尺寸,任何类型的地址都一样采用int类型的统一字节尺寸存储
  79. printf("%d \n", sizeof(*pNum));//尺寸,方式
  80. system("pause");
  81. }
  82. //08.指针认识规律:
  83. // *pNum<=>num
  84. int main04(void)
  85. {
  86. int num = 20;
  87. int data = 30;
  88. int * pNum = &num;//int类型的一级指针变量存储了int类型的普通变量的内存地址
  89. //&num = 1;//内存地址不允许操作,由于&num这个表达式是在CPU的寄存器当中所进行的操作,然而C语言是不能够直接修改寄存器当中的数据的
  90. //pNum = &data;
  91. num = 3;
  92. printf("%d,%d \n", *pNum, num);//*pNum和num是完全等价的
  93. *pNum = 7;
  94. printf("%d,%d \n", *pNum, num);
  95. system("pause");
  96. }
  1. ///02.间接赋值.c
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. //01.函数形参具有副本机制:
  5. // 1.传值和传指的数据层面意思都一样;
  6. // 只不过对同样的数值有着不同的解析方式!
  7. // 1.函数的副本机制总是存在;
  8. // 无论是传值还是传地!
  9. void change05(int num)//函数形参具有副本机制
  10. {
  11. //函数形参具有副本机制,因此,无论是传值还是传指,都具备这样的特性:
  12. // 传值传递的是副本,传指传递的是地址,因此出现不一样的修改效果
  13. // 实质:都是副本,只不过对待同样的数值解析方式不同而已
  14. num = 3;
  15. printf("change05 = %d \n", num);
  16. }
  17. int main05(void)
  18. {
  19. int num = 10;
  20. change05(num);
  21. printf("%d \n", num);
  22. system("pause");
  23. }
  24. void change06(int * pNum)
  25. {
  26. *pNum = 3;
  27. }
  28. int main07(void)
  29. {
  30. int num = 10;
  31. change06(&num);//&num-->表达式-->没有内存实体-->位于寄存器-->C语言不具备修改寄存器的权限
  32. printf("%d \n", num);
  33. system("pause");
  34. }

程序片段(02):01.Run.c

内容概要:

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. //01.外挂修改数值原理
  4. // 1.注入DLL模块儿
  5. // 2.根据指针进行跨函数访问内存
  6. _declspec(dllexport) void go()
  7. {
  8. int * p = (int *)0xae0720;
  9. *p = 77;
  10. }
  11. //02.遍历内存查找原理:
  12. // 1.单字节内存遍历
  13. // 2.待查找尺寸读取
  14. _declspec(dllexport) void run()
  15. {
  16. typedef char * Char;
  17. for (Char pStart = 0xae000000,pEnd = 0xae100000; pStart < pEnd; ++pStart)//单字节遍历指定内存范围
  18. {
  19. int * p = (int *)p;//指针类型转换,待查找尺寸读取数据进行匹配,以便于相同数值进行内存检索
  20. if (77 == *p)
  21. {
  22. *p = 86;
  23. }
  24. }
  25. }

程序片段(03):01.void.c+02.空指针.c

内容概要:Void与空类型指针

  1. ///01.void.c
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. //01.空类型与空类型指针:
  5. // 空类型:void
  6. // 空类型指针:void *
  7. //02.指针类型:
  8. // 解析步长+解析方式
  9. //03.空类型指针变量:
  10. // 可以存储任何类型的指针
  11. int main01(void)
  12. {
  13. //error C2182:"a":非法引用"void"类型 void
  14. int num = 10;
  15. double db = 19.3;
  16. //void num;//不合法-->没有明确数据类型-->编译器既不知道分配多大步长的内存块儿,也不知道按照何种方式进行分配!
  17. void * vp = &num;//合法->Win平台(32/64)编译器明确指针所应使用的内存字节尺寸-->不需要明确解析方式-->因为只是一个数值意义的地址
  18. vp = &db;//空类型的指针可以存储任何类型变量(普通变量,一级指针变量,二级指针变量,三级指针变量,多级指针变量等等...)的地址,因为编译器决定了地址存储尺寸
  19. //printf("%d \n", *vp);//:error C2100:非法的间接寻址(问题原因通常是采用空类型的指针对该指针所存储的地址进行解析)->既不明确解析尺寸,也不明确解析方式,所以出错
  20. //空类型的指针既不可以间接取值,也不可以间接赋值(也就是只能存储内存地址,而不能根据内存地址进行间接访问操作)
  21. //*vp = 10;
  22. printf("%f \n", *((double *)vp));//将空类型的指针转化为具体指针类型,然后就达到了既明确了指针的解析步长,也明确了解析方式
  23. system("pause");
  24. }
  1. ///02.空指针.c
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. //01.结构体变量:
  5. // 用于组织多种不同类型的变量
  6. struct MyStruct//包含四根指针,花心的妹子,可以进行动态的扩充
  7. {//一个由多个一级指针变量所构成的单个普通结构体变量
  8. int *p1;
  9. int *p2;
  10. int *p3;
  11. int *p4;
  12. };
  13. //02.空指针(NULL):
  14. // 实质:(void *)0
  15. // 作用:标识任何指针变量没有存储内存地址
  16. // 特点:空指针所指向的内存实体不允许访问,否则出现访问异常
  17. int main02(void)
  18. {
  19. //标记指针变量是否存储内存地址
  20. double db = 10.9;
  21. double 刘海华 = 10.9;
  22. double * pDb = NULL;//空指针(NULL):标识任何指针变量没有存储内存地址
  23. while (NULL == pDb)
  24. {
  25. //炮之
  26. pDb = &刘海华;
  27. }
  28. *pDb = 1;//空指针所指向的内存实体不允许进行操作
  29. system("pause");
  30. }

程序片段(04):01.指针的声明.c

内容概要:指针的声明

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. //01.声明指针变量:
  4. // 数据类型+指针级数+指针变量
  5. int main01(void)
  6. {
  7. int * p1;
  8. int * p2;
  9. system("pause");
  10. }
  11. //02.特殊声明格式:
  12. // 格式:数据类型 * p, num;
  13. // 特点:p是指针变量,num是普通变量
  14. int main02(void)
  15. {
  16. int numA, numB, numC;
  17. double * pNumA, pNumB, pNumC;
  18. printf("%d \n", sizeof(pNumA));//在Win32平台之下,所有类型,所以级数的指针变量都占用4个字节的内存尺寸
  19. printf("%d \n", sizeof(pNumB));
  20. system("pause");
  21. }
  22. //03.宏定义(宏替换)和别名定义的区别:
  23. // 宏定义:第二整块儿替换后置
  24. // 别名定义:最后整块儿替换前置
  25. #define 整数 int
  26. typedef int INT;
  27. int main03(void)
  28. {
  29. 整数 x = 3;//替换后置
  30. INT y = 3;//替换前置
  31. printf("%d, %d \n", x, y);
  32. system("pause");
  33. }
  34. //04.别名定义规律:
  35. // 变量定义:int * pNum
  36. // 添关键字:typedef int * pNum;
  37. // 特点:变量名变为类型别名
  38. #define 指针 double *
  39. typedef double * DBP;
  40. int main04(void)
  41. {
  42. 指针 p1;
  43. DBP p2;
  44. //printf("%p, %p \n", p1, p2);
  45. printf("%d, %d \n", sizeof(p1), sizeof(p2));
  46. system("pause");
  47. }
  48. //05.特别注意:
  49. // 1.宏定义(宏替换)和别名定义之间的区别
  50. // 2.预编译与真实别名
  51. int main05(void)
  52. {
  53. 指针 p1, p2;//实质:double *p1, p2, p3;//4,8
  54. p1 = 0x123;
  55. p2 = 0x123;
  56. DBP p3, p4;//doube *类型
  57. p3 = 0x123;
  58. p4 = 0x123;
  59. printf("%d, %d \n", sizeof(p1), sizeof(p2));
  60. printf("%d, %d \n", sizeof(p3), sizeof(p4));
  61. system("pause");
  62. }

程序片段(05):01.银行.c+02.指针数组.c

内容概要:数据地址映射

  1. ///01.银行.c
  2. #define _CRT_SECURE_NO_WARNINGS
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. //01.C语言编译器特点:
  6. // 未初始化的普通变量->编译通过
  7. // 未初始化的指针变量->编译不过
  8. //02.数据地址映射使用:
  9. // 1.不允许改变原始内存实体的情况,实现排序
  10. // 2.比较数据实体,交换指针变量
  11. // 注:
  12. // 1.只有整型数据才能使用位运算
  13. // 2.升序的反面成立,既需要进行交换
  14. int main01(void)
  15. {
  16. int num1;//内存实体
  17. int num2;
  18. scanf("%d%d", &num1, &num2);//从从小到大
  19. int * p1 = &num1;//映射指针
  20. int * p2 = &num2;
  21. if (*p1 > *p2)//升序的反面成立,就需要进行交换
  22. {
  23. //p1 = p1 ^p2;//只有整型才能使用位运算
  24. int * ptemp = p1;
  25. p1 = p2;
  26. p2 = ptemp;
  27. }
  28. printf("%d, %d \n", *p1, *p2);
  29. system("pause");
  30. }
  31. //03.指针变量声明与const关键字使用:
  32. // 规律:const在指针变量名称前面,也就是星号("*")的右边
  33. // 就表明该指针变量本身是一个伪常量,也就是该指针变量
  34. // 不能直接进行修改,但是可以通过间接方式进行修改
  35. // 特点:const int * p<=>int const * p
  36. // 只需要关注const与星号("*")之间的相对位置
  37. // 用处:限定访问权限
  38. // 读取权限和修改权限的综合配对
  39. //void accessControl(const int * p);
  40. void accessControl(int const * p)//报表权限:限定访问权限,间接操作的内存实体只能读取,不能进行修改
  41. {//const在指针当中所能起到的作用
  42. p = NULL;//通过指针变量间接访问的内存实体是个真常量,不允许进行间接修改,但是当前指针变量可以进行修改
  43. printf("*p = %d \n", *p);//不能根据空指针进行内存实体访问,既不能读取也不能写入(操作系统规定)-->编译不报错,但是运行报错
  44. //*p = 10;//编译报错
  45. }
  46. int main02(void)
  47. {
  48. int num = 100;
  49. int * pNum = &num;
  50. accessControl(pNum);
  51. printf("num = %d \n", num);
  52. system("pause");
  53. }
  1. ///02.指针数组.c
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. //int a[8];
  5. //const int *p[8];
  6. int a[8] = { 1,8,2,7,3,6,4,5 };//int类型的数组
  7. const int * p[8] = { &a[0],&a[1],&a[2],a + 3,a + 4,a + 5,a + 6,a + 7 };//指针数组
  8. void main()
  9. {
  10. printf("原来的数组数据:\n");
  11. for (int i = 0; i < 8; i++)
  12. {
  13. printf("%d\n", a[i]);
  14. }
  15. printf("原来的指针数组指向数据:\n");
  16. for (int i = 0; i < 8; i++)
  17. {
  18. printf("%d\n", *p[i]);
  19. }
  20. for (int i = 0; i < 8 - 1; i++)//最后一个数据不需要冒泡
  21. {
  22. for (int j = 0; j < 8 - 1 - i; j++)//冒泡数与与i形成对应关系
  23. {
  24. //指针数组当中存储的是指针,然后通过指针进行数据的获取,通过比较指针所对应的数据,然后进行数据交换
  25. if (*p[j]>*p[j+1])//这里使用指针数组进行比较数据,用数组指针进行数据获取比较,然后进行数据交换
  26. {//指针交换
  27. int *ptemp = p[j];
  28. p[j] = p[j + 1];
  29. p[j + 1] = ptemp;
  30. }
  31. }
  32. }
  33. printf("数组数据:\n");
  34. for (int i = 0; i < 8; i++)
  35. {
  36. printf("%d\n", a[i]);
  37. }
  38. printf("指针数组指向数据:\n");
  39. for (int i = 0; i < 8; i++)
  40. {
  41. printf("%d\n", *p[i]);
  42. }
  43. system("pause");
  44. }

程序片段(06):01.输入指针.c

内容概要:地址输入

  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. int main01(void)
  5. {
  6. int num = 10;
  7. int data = 20;
  8. printf("%p, %p \n", &num, &data);
  9. int * pNum = &pNum;
  10. //对指针变量进行手动地址输入:
  11. // 格式:scanf("%p", &pNum);
  12. // 特点:不需要携带0x前缀,而且必须是大写英文字母
  13. scanf("%p", pNum);//地址类型数组需要使用%p这种输入格式控制符+指针变量的地址
  14. *pNum = 20 + 3;//操作系统所使用的地址,胡乱进行访问的时候容易出现系统问题
  15. printf("num = %d, data = %d \n", num, data);
  16. system("pause");
  17. }

程序片段(07):01.Screen.c

内容概要:屏幕输出图片

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <Windows.h>
  4. int main(void)
  5. {
  6. int i = 0;
  7. while (1)
  8. {
  9. HWND win = GetDesktopWindow();
  10. HDC winDc = GetWindowDC(win);//获取指定窗口的输出接口
  11. HDC memDc = CreateCompatibleDC(0);//获取内存存储的操作接口
  12. HBITMAP bitMap = (HBITMAP)LoadImage(win, TEXT("1.bmp"), IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION);
  13. SelectObject(memDc, bitMap);//选定图形图像设备-->设置显示什么
  14. BitBlt(winDc, 0, 0, i++, i++, memDc, i++, i++, SRCCOPY);
  15. Sleep(100);//模拟0.1秒
  16. ++i;
  17. if (3 == i)//到达3次
  18. {
  19. i = 0;//重置0次
  20. }
  21. }
  22. system("pause");
  23. }

程序片段(08):test.c

内容概要:Test1

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4. #define EN 1024
  5. int flag = 0;
  6. char * filePath = "E:\\Resource\\TestData\\BigDB\\Test.txt";
  7. //数组赋值
  8. int intArr[EN];
  9. void initArr(int intArr[EN])
  10. {
  11. //time_t te;
  12. //unsigned int seed = (unsigned int)(time(&te));
  13. //srand(seed);
  14. srand((unsigned int)(time(NULL)));
  15. for (int i = 0; i < EN; ++i)
  16. {
  17. intArr[i] = rand() % EN + 1;
  18. }
  19. }
  20. //数组显示
  21. void showArr(int intArr[EN])
  22. {
  23. for (int i = 0; i < EN; ++i)
  24. {
  25. printf("%4d \n", intArr[i]);
  26. }
  27. }
  28. //冒泡排序
  29. void bubbleSortArr(int intArr[EN])
  30. {
  31. for (int i = 0; i < EN - 1; ++i)
  32. {
  33. for (int j = 0; j < EN - 1 - i; ++j)
  34. {
  35. if (intArr[j] > intArr[j + 1])
  36. {
  37. intArr[j] = intArr[j] ^ intArr[j + 1];
  38. intArr[j + 1] = intArr[j] ^ intArr[j + 1];
  39. intArr[j] = intArr[j] ^ intArr[j + 1];
  40. }
  41. }
  42. }
  43. }
  44. //选择排序
  45. void selectSortArr(int intArr[EN])
  46. {
  47. int minIndex = 0;
  48. int minNum = 0;
  49. for (int i = 0; i < EN - 1; ++i)
  50. {
  51. minIndex = i;
  52. minNum = intArr[i];
  53. for (int j = i + 1; j < EN; ++j)
  54. {
  55. if (minNum > intArr[j])
  56. {
  57. minIndex = j;
  58. minNum = intArr[j];
  59. }
  60. }
  61. if (i != minIndex)
  62. {
  63. intArr[i] = intArr[i] ^ intArr[minIndex];
  64. intArr[minIndex] = intArr[i] ^ intArr[minIndex];
  65. intArr[i] = intArr[i] ^ intArr[minIndex];
  66. }
  67. }
  68. }
  69. //插入排序
  70. void insertSortArr(int intArr[EN])
  71. {
  72. int currentIndex = 0;
  73. int currentValue = 0;
  74. for (int i = 1; i < EN; ++i)
  75. {
  76. currentIndex = i;
  77. currentValue = intArr[currentIndex];
  78. while (0 < currentIndex && intArr[currentIndex - 1] > currentValue)
  79. {
  80. intArr[currentIndex] = intArr[currentIndex - 1];
  81. --currentIndex;
  82. }
  83. intArr[currentIndex] = currentValue;
  84. }
  85. }
  86. //二分查找
  87. int binarySearch(int intArr[EN], int value)
  88. {
  89. int minIndex = 0;
  90. int midIndex = 0;
  91. int maxIndex = EN - 1;
  92. while (minIndex <= maxIndex)
  93. {
  94. midIndex = (minIndex + maxIndex) / 2;
  95. if (value == intArr[midIndex])
  96. {
  97. return midIndex;
  98. }
  99. else if (value < intArr[midIndex])
  100. {
  101. maxIndex = midIndex - 1;
  102. }
  103. else
  104. {
  105. minIndex = midIndex + 1;
  106. }
  107. }
  108. return -1;
  109. }
  110. //拉格朗日查找
  111. int lagrangeSearch(int intArr[EN], int value)
  112. {
  113. int minIndex = 0;
  114. int ratioIndex = 0;
  115. int maxIndex = EN - 1;
  116. while (minIndex <= maxIndex)
  117. {
  118. //midIndex = minIndex + (maxIndex - minIndex) / 2;
  119. ratioIndex = minIndex + (maxIndex - minIndex)*(value - intArr[minIndex]) / (intArr[maxIndex] - intArr[minIndex]);
  120. if (value == intArr[ratioIndex])
  121. {
  122. return ratioIndex;
  123. }
  124. else if (value < intArr[ratioIndex])
  125. {
  126. maxIndex = ratioIndex - 1;
  127. }
  128. else
  129. {
  130. minIndex = ratioIndex + 1;
  131. }
  132. }
  133. return -1;
  134. }
  135. int main01(void)
  136. {
  137. initArr(intArr);
  138. showArr(intArr);
  139. insertSortArr(intArr);
  140. printf("binSearch Index = %d \n", binarySearch(intArr, 880));
  141. printf("lagrangeSearch index = %d \n", lagrangeSearch(intArr, 880));
  142. system("pause");
  143. }

20160206.CCPP体系详解(0016天)的更多相关文章

  1. 20160129.CCPP体系详解(0008天)

    程序片段(01):函数.c+call.c+测试.cpp 内容概要:函数 ///函数.c #include <stdio.h> #include <stdlib.h> //01. ...

  2. 20160226.CCPP体系详解(0036天)

    程序片段(01):01.多线程.c+02.多线程操作.c 内容概要:多线程 ///01.多线程.c #include <stdio.h> #include <stdlib.h> ...

  3. 20160208.CCPP体系详解(0018天)

    程序片段(01):main.c 内容概要:PointWithOutInit #include <stdio.h> #include <stdlib.h> //01.野指针详解: ...

  4. 20160205.CCPP体系详解(0015天)

    程序片段(01):01.杨辉三角.c 内容概要:杨辉三角 #include <stdio.h> #include <stdlib.h> #define N 10 //01.杨辉 ...

  5. 20160204.CCPP体系详解(0014天)

    程序片段(01):define.h+data.h&data.c+control.h&control.c+view.h&view.c+AI.h&AI.c+main.c 内 ...

  6. 20160203.CCPP体系详解(0013天)

    程序片段(01):数组.c+02.数组初始化语法.c 内容概要:数组 ///01.数组.c #include <stdio.h> #include <stdlib.h> //0 ...

  7. 20160128.CCPP体系详解(0007天)

    以下内容有所摘取,进行了某些整理和补充 论浮点数的存储原理:float浮点数与double浮点数的二进制存储原理–>阶码 浮点数转二进制 1.整数int类型和浮点数float类型都是占用4个字节 ...

  8. 20160127.CCPP体系详解(0006天)

    程序片段(01):msg.c 内容概要:线程概念 #include <stdio.h> #include <stdlib.h> #include <Windows.h&g ...

  9. 20160217.CCPP体系详解(0027天)

    程序片段(01):TestCmd.c 内容概要:管道_字符串 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include < ...

随机推荐

  1. ZOJ3720 Magnet Darts(点在多边形内)

    第一道点在多边形内的判断题,一开始以为是凸的.其实题意很简单的啦,最后转化为判断一个点是否在一个多边形内. 如果只是简单的凸多边形的话,我们可以枚举每条边算下叉积就可以知道某个点是不是在范围内了.但对 ...

  2. POJ 2027

    #include<iostream> using namespace std; int main() { int time; cin>>time; int a; int b; ...

  3. POJ 1279 Art Gallery(半平面交求多边形核的面积)

    题目链接 题意 : 求一个多边形的核的面积. 思路 : 半平面交求多边形的核,然后在求面积即可. #include <stdio.h> #include <string.h> ...

  4. IDA 与VC 加载符号表

    将Windbg路径下的symsrv.yes 拷贝到ida 的安装目录,重新分析ntoskrnl.exe, 加载本地的符号表 添加环境变量  变量名:_NT_SYMBOL_PATH变量值:SRV*{$P ...

  5. hdu2024C语言合法标识符

    #include<iostream> #include<stdio.h> #include<math.h> #include<stdlib.h> #in ...

  6. How to configure Spring facet in IntelliJ IDEA

    遇到了这个问题,稀里糊涂的就给搞定了,在stackoverfolw上看到了相同的问题,直接拷贝下来吧 Spring Configuration Check Unmapped Spring config ...

  7. Java:网络编程之IP、URL

    java.net  类 InetAddress 此类表示互联网协议 (IP) 地址. 会抛出异常 UnknownHostException   直接已知子类:         Inet4Address ...

  8. SQL Server 高性能写入的一些总结

    1.1.1 摘要 在开发过程中,我们不时会遇到系统性能瓶颈问题,而引起这一问题原因可以很多,有可能是代码不够高效.有可能是硬件或网络问题,也有可能是数据库设计的问题. 本篇博文将针对一些常用的数据库性 ...

  9. Oracle ->> TRUNC, ROUND, CEIL, FLOOR

    ), ), CEIL(10.01), FLOOR(10.9999) FROM dual; 结果: TRUNC是直接截断小数位 ROUND是四舍五入 CEIL和FLOOR则是和SQL SERVER一样返 ...

  10. c# 文件简繁体转换

    C#   文件简繁体转换 简繁体转换: 方案一: 准确性高,耗性能 方案二: 准确性低,效率高 1 using Microsoft.International.Converters.Tradition ...