码迷,mamicode.com
首页 >  
搜索关键字:unsigned    ( 4409个结果)
057_删除聊表中的重复的节点
#include #include using namespace std; typedef struct ListNode { int data; struct ListNode * next; ListNode(int d) : data(d), next(NULL){} }; ListNode *initList(int *array, unsigned int lengt...
分类:其他好文   时间:2014-09-13 22:49:16    阅读次数:192
c与c++分别是怎样动态分配和释放内存的,有什么区别
## C语言 c语言提供内存动态分配的函数有:malloc、calloc、realloc,在使用这些函数时必须包含其头文件,分别为:`、、` 1) malloc 函数:` void *malloc(unsigned int size)` 在内存的动态分配区域中分配一个长...
分类:编程语言   时间:2014-09-13 20:14:27    阅读次数:223
中值滤波和均值滤波C++代码
均值滤波和中值滤波代码2008-11-24 16:07:36|分类:编程|举报|字号订阅//------------------均值滤波器bool FilterAV(unsigned char *image,int height,int width){int i,j;unsigned char *p...
分类:编程语言   时间:2014-09-12 17:00:23    阅读次数:1895
多媒体开发之---h264 取流解码分析
1.nalu_unit_type = *((unsigned char *)pEmptyBuf->bufVirtAddr+4); nalu_unit_type = nalu_unit_type&0x1F; if(nalu_unit_type=1) { slice_sum ++; printf(".....
分类:其他好文   时间:2014-09-12 16:57:13    阅读次数:272
高效统计整数中 1 的比特数
输入一个无符号整数,统计该整数中含1的比特数。 #include int numbits(unsigned int n) { int count = 0; while(n>0){ n &= (n-1);//每次操作去掉n中最低位的1 count++; } return count; } int main() { unsigned int n; scanf("%d",&n); ...
分类:其他好文   时间:2014-09-12 12:03:53    阅读次数:163
srand函数
srand函数是随机数发生器的初始化函数。 原型:void srand(unsigned seed); 用法:它需要提供一个种子,这个种子会对应一个随机数,如果使用相同的种子后面的rand()函数会出现一样的随机数。如: srand(1); 直接使用1来初始化种子。不过为了防止随机数每次重复常常.....
分类:其他好文   时间:2014-09-12 11:27:53    阅读次数:198
malloc函数具体解释
一、原型:extern void *malloc(unsigned int num_bytes);头文件:#include 或 #include (注意:alloc.h 与 malloc.h 的内容是全然一致的。)功能:分配长度为num_bytes字节的内存块说明:假设分配成功则返回指向被分配内.....
分类:其他好文   时间:2014-09-11 22:13:52    阅读次数:225
c冒泡排序
外层循环需要循环和len一样的次数//定义一个函数,该函数返回NSStringvoid bubbleSort(int nums[],unsigned long len){ //控制本轮循环是否发生过交换 //如果没有发生交换,那么说明该数组已经处于有序状态,可以提前结束排序 BOOL has...
分类:其他好文   时间:2014-09-11 22:08:02    阅读次数:187
Lua1.1 数据结构
分析一下 lua 中常用的几个数据结构: 先看一下 opcode.h 中的: typedef?unsigned?char?Byte; typedef?unsigned?short?Word; typedef?union { ?struct?{char?c1;?char?c2;}?m; ?Word?w; }?CodeW...
分类:其他好文   时间:2014-09-11 13:59:42    阅读次数:234
ZOJ 3812 We Need Medicine 01背包+位优化
题目链接:点击打开链接 #include #include #include #include #include typedef unsigned long long ll; using namespace std; const int N = 400 + 1; const int M = 200000 + 1; int t[N], w[N], g[51][M], ans[N], de...
分类:其他好文   时间:2014-09-10 23:57:41    阅读次数:502
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!