摘要: 冒泡排序 #include <stdio.h> 阅读全文
posted @ 2016-12-19 20:00 小宏~ 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 数据类型 字符类型 char 整型 short (int)、int 、long (int),其前面可以分别加上signed和unsigned来表示有符号和无符号 浮点类型 float 、double、long double 需要注意的是有效位并不依赖于小数点的位置: 643300 和 6.397的有 阅读全文
posted @ 2016-10-25 19:22 小宏~ 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 让centos能够上网 刚安装了时,是不能联网的,我们可以通过以下命令更改即可: cd /etc/sysconfig/network-script vi ifcfg-eth0 更改其中的ONBOOT=no中的no为yes 安装vmtools 具体命令如下: 点击安装vmtools工具 mkdir / 阅读全文
posted @ 2016-08-09 21:39 小宏~ 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 有一点感觉很重要,那就是用a或a+等方式打开文件,然后紧接着用ftell(fp);获取文件位置指针,发现都是0,但是发现当第一次写的时候文件位置会移到文件尾。 读文件 出错返回NULL FILE *fp=fopen("D:\\demo.txt","r"); 打开方式 1.如何没有b,则是以文本方式打 阅读全文
posted @ 2016-08-08 15:25 小宏~ 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 一、win10下使用win7那样的图片查看器快些。 打开图片的设置,关闭自动增强我的图片 二、查看win10秘钥 1、打开注册表,依次定位:HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/SoftwareProtecti 阅读全文
posted @ 2016-05-16 09:52 小宏~ 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 想要使用gdb调试程序的话,首先需要gcc -g main.c -o test 然后运行gdb test对程序进行调试 l (小写的l,是list的首字母),用以列出程序 回车 是运行上一个命令 b func 可以设置到func函数的断点 info break 可以用来查看断点 r (run的首字母 阅读全文
posted @ 2016-05-15 21:25 小宏~ 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 在虚拟机vmware 中如果打算安装vmware tools增强工具的话! 可 以先在mnt目录下创建一个文件夹,mkdir /mnt/cdrom,然后通过mount /dev/cdrom /mnt/cdrom ,这里需要注意/mnt/cdrom中的文件此时只可读,所以可以进入目录后可以通过cp v 阅读全文
posted @ 2016-05-14 13:15 小宏~ 阅读(381) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<stdlib.h>#define LIST_MAX 10#define LIST_ADD 2typedef struct { int *elem; int length; int listsize;}SqList;int InitList(SqLi 阅读全文
posted @ 2016-05-09 19:30 小宏~ 阅读(371) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<stdlib.h>typedef struct { int *elem; int length; int listsize;}SqList;#define LIST_MAX 10#define LIST_ADD 2int InitList(SqLi 阅读全文
posted @ 2016-05-08 19:28 小宏~ 阅读(831) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<stdlib.h>int InitTriplet(int **T,int v1,int v2,int v3){ *T=(int*)malloc(3*sizeof(int)); if(!*T) { printf("分配空间失败!\n"); exit( 阅读全文
posted @ 2016-05-07 23:48 小宏~ 阅读(229) 评论(0) 推荐(0) 编辑