
C++
文章平均质量分 69
aricover
hunt for novelty
展开
-
Preprocessor
What‘s preprocessor?Preprocessor is a process before compiler and link when your C/C++ compiler system compiling program,it will do a little formatting,and carries out any instructions you havegive原创 2017-03-28 18:01:11 · 594 阅读 · 0 评论 -
单线程与多线程读取文件
//实验多个线程读取多个文件和单个线程读取多个文件//当文件数量是2-3个时,单线程比多线程更快,可能是没有创建线程之类的开销//文件数量增加到10多个以后,多个线程稍微快一点,但是并没有快多少//按照网上的说法,读取文件的性能瓶颈是磁盘io的速度,多个线程并不能提高性能#include #include #include #include #include using namespac原创 2017-09-06 15:05:35 · 3884 阅读 · 1 评论 -
rotate实现
rotate#include/*案例一 长度7旋转2 gcd = 1 故 i < 1i = 0 i = (i+dis)%len_bcdefg (0+2)%7 = 2cb_defg (2+2)%7 = 4cbed_fg (4+2)%7 = 6cbedgf_ (6+2)%7 = 1c_edgfb (1+2)%7 = 3cde_gfb (3+2)%7 =原创 2017-08-30 17:53:25 · 535 阅读 · 0 评论 -
windows下dll开发杂记<一>
在目前的项目中,发现原子业务的导出没有使用extern "C"关键字,而业务dll导出函数中使用了extern “C”关键字,仔细思考了下,什么情况下需要使用extern "C",一.在c++代码中调用的c的函数,需要先extern "C"声明,二.声明c++的函数为extern "C"提供给c调用,使用extern "C"告诉编译器,按照c的方式来编译接口函数,这里可以使用宏来复用#ifde原创 2017-10-23 10:30:16 · 378 阅读 · 0 评论 -
位图内存管理
最近看代码看到内存位图管理,在网上搜了下相关的资料,然后热度第一的csdn的一篇帖子上面解释的很难理解,叙述的也存在一些问题,后来找到很久的其他帖子,终于明白了,所以mark一下。 static byte const firstHoleSize [] = { 8, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, ...原创 2018-05-24 19:34:33 · 1889 阅读 · 0 评论