摘要: 任务 简单统计一个小说中哪些个汉字出现的频率最高 知识点 1. 文件操作 2. 字典 3. 排序 4. lambda 代码 统计了一个11M的小说,结果如下: 阅读全文
posted @ 2017-04-06 20:42 Weyne 阅读(15306) 评论(0) 推荐(0) 编辑
摘要: 症状在使用Debug模式时,程序可以正常启动,但是切换到Release模式,程序报错,错误码-1073741823原因程序中使用了过多的new。比如:QActionGroup *mProtocolGroup;mLidarTypeSelGroup = new QActionGroup(this);这个heap是在构造函数期间申请的,也就是说在整个程序运行期间,都会占用heap。然而,系统给程序的堆的... 阅读全文
posted @ 2017-04-06 10:05 Weyne 阅读(1196) 评论(0) 推荐(0) 编辑
摘要: 错误方法rm *.o" -recurse按照提示,rm(remove-item)是可以递归删除子文件夹的。但是这个方法确实无效。在他们的示例里面找到说明:-------------------------- 示例 4 --------------------------C:\PS>get-childitem * -include *.csv -recurse | remove-item说明----... 阅读全文
posted @ 2017-04-06 10:03 Weyne 阅读(1998) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"int main(int argc ,char **argv){ printf("argc = %d \n",argc); while(argc--) { printf("%s\n",*(argv+argc)); } return 1;}输出:gcc test.c -o test.exe./test.exe para1... 阅读全文
posted @ 2017-04-06 09:48 Weyne 阅读(2765) 评论(0) 推荐(0) 编辑
摘要: 功能 读取一个文本文件,将其中的文本按规则转换为int数据,然后对数据进行处理。文本的格式类似36 565 233... 代码 #include <stdio.h> #include <stdlib.h> #include <memory.h> #include <string.h> const c 阅读全文
posted @ 2017-04-06 09:47 Weyne 阅读(928) 评论(0) 推荐(0) 编辑
摘要: 指针作为函数参数传递 函数参数传递的只能是数值,所以当指针作为函数参数传递时,传递的是指针的值,而不是地址。 #include "stdio.h" void pointer(int *p) { int a = 11; printf("\n\nEnter function"); printf("\nt 阅读全文
posted @ 2017-04-06 09:46 Weyne 阅读(19418) 评论(1) 推荐(1) 编辑