码迷,mamicode.com
首页 >  
搜索关键字:模拟实现    ( 554个结果
【c++】模拟实现boost库下的scoped_array
//模拟实现boost库下的scoped_array #include #include using namespace std; template class scoped_array { private: T * px; scoped_array(scoped_array const &); scoped_array& operator=(scoped_array const...
分类:编程语言   时间:2015-07-17 16:16:08    阅读次数:118
【c++】模拟实现boost库里的scoped_ptr
//模拟实现boost下的scoped_ptr #include #include using namespace std; template class scoped_ptr { private: T * px; scoped_ptr(scoped_ptr const &); scoped_ptr& operator=(scoped_ptr const &); void ...
分类:编程语言   时间:2015-07-17 12:01:02    阅读次数:157
jquery模拟实现仿select效果
本着服务为人民的远大理想,最近写了个jquery模拟select效果的小东东,挺好用,分享下。 可以直接在我上传的资源里下载压缩包,下载地址:jquery模拟实现仿select效果。 首先,上html页面代码 js模拟select 省份 北京 河北省 山东省 城市...
分类:Web程序   时间:2015-07-14 18:04:42    阅读次数:138
黑马程序员—交通灯管理系统
------Java培训、Android培训、iOS培训、.Net培训、期待与您交流! -------一、 模拟实现十字路口的交通灯管理系统逻辑,具体需求如下:Ø 异步随机生成按照各个路线行驶的车辆。例如: 由南向北的车辆 ---- 直行车辆 由西向南的车辆 ---- 右转车...
分类:其他好文   时间:2015-07-08 18:07:05    阅读次数:193
Leetcode 232 Implement Queue using Stacks 和 231 Power of Two
1. 232 Implement Queue using Stacks1.1 问题描述  使用栈模拟实现队列。模拟实现如下操作:    push(x). 将元素x放入队尾。 pop(). 移除队首元素。 peek(). 获取队首元素。 empty(). 判断队列是否为空。 注意:只能使用栈的标准操作,push,pop,size和empty函数。1.2 方法与思路   本题和用队列实现栈思路一样,设...
分类:其他好文   时间:2015-07-07 11:07:50    阅读次数:112
【c语言】模拟实现库函数的atof函数
// 模拟实现库函数的atof函数 #include #include #include #include double my_atof(char const *p) { double ret = 0; int flag = 1; int count = 0; assert(p != NULL); while (isspace(*p)) { p++; } whil...
分类:编程语言   时间:2015-07-04 16:47:04    阅读次数:138
【c语言】 模拟实现库函数的atoi函数
// 模拟实现库函数的atoi函数 #include #include #include #include int my_atoi(char const *p) { int ret = 0; int a = 0; int flag = 1; assert(p != NULL); while (isspace(*p)) { p++; } while (*p) { ...
分类:编程语言   时间:2015-07-04 15:31:00    阅读次数:170
[C语言】模拟实现库函数strstr,查找子字符串
//模拟实现库函数strstr,查找子字符串 #include #include char * my_strstr( char *dst, const char * src) { assert(dst); assert(src); int i, j, k; for (i = 0; dst[i] != '\0'; i++) { for (j = i, k = 0; src[k] !...
分类:编程语言   时间:2015-07-04 11:19:02    阅读次数:174
【C语言】模拟实现memmove函数(考虑内存重叠)
//模拟实现memmove函数(考虑内存重叠) #include #include #include void * memmove(void * dst, const void * src, int count) { void * ret = dst; assert(dst); assert(src); if (dst = ((char *)src + count)) //正常情...
分类:编程语言   时间:2015-07-03 12:25:59    阅读次数:160
【C语言】模拟实现memcpy库函数
//模拟实现memcpy库函数 #include #include void * my_memcpy(void * dst, const void * src, int count) { void *ret = dst; while (count--) { *(char *)dst = *(char *)src; dst=(char *)dst+1; src=(char *)...
分类:编程语言   时间:2015-07-03 12:24:35    阅读次数:133
554条   上一页 1 ... 42 43 44 45 46 ... 56 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!