码迷,mamicode.com
首页 >  
搜索关键字:unsigned    ( 4409个结果)
【C/C++】整型变量
整型变量的分类1.基本型:类型说明符为 int 2.短整量:类型说明符为short int或short3.长整型:类型说明符为long int 或 long4.无符号型:类型说明符为unsigned注意这里战多少个字节跟系统和编译器规定有关的!可以使用以下代码来试试看 1 #include 2 3 ...
分类:编程语言   时间:2014-11-19 21:54:26    阅读次数:240
cocos2dx3.2 判断音效是否播放
SimpleAudioEngine类中加入一函数 如下 bool isEffectPlaying(unsigned int nSoundId); 定义如下 bool SimpleAudioEngine::isEffectPlaying(unsigned int nSoundId) { EffectList::iterator p = sharedList().find(nSoundId)...
分类:其他好文   时间:2014-11-19 18:49:53    阅读次数:201
深入理解 C 指针阅读笔记 -- 第六章
Chapter6.h#ifndef __CHAPTER_6_ #define __CHAPTER_6_ /*《深入理解C指针》学习笔记 -- 第六章*/ typedef struct __person { char* name; char* title; unsigned int age; }person; /*结构体内存的释放问题*/ void __struct_memory_...
分类:其他好文   时间:2014-11-19 16:07:48    阅读次数:119
完数求法
#include#includemain(){unsigned int i,a,m;for(i=2;i<1000;i++){m=0;for(a=1;a<i;a++){ if(i%a==0) m=m+a;}if(m==i){ printf("\n%5d\n",i); for(a=1;a<i;a++){...
分类:其他好文   时间:2014-11-19 07:26:37    阅读次数:177
mysql的schema与数据类型优化分析
Schema与数据类型优化: ???? 1.选择优化的数据类型 更小的通常更好:一般情况下,尽量使用可以正确存储数据的最小数据类型 如:只需存0-200,tinyint unsigned更好。 简单就好:如:整型比字符串操作代价更低...
分类:数据库   时间:2014-11-19 02:24:47    阅读次数:187
Libevent源码分析(一):最小堆
Libevent中的timeout事件是使用最小堆来管理维护的.代码位于.看函数命名和代码风格应该是一个C++程序员,函数名都挺好懂的,只是下面这个结构体变量命名比较坑....typedef struct min_heap{ struct event** p; unsigned n, a...
分类:其他好文   时间:2014-11-18 00:17:50    阅读次数:239
第一个只出现一次的字符
题目:在一个字符串中找到第一个只出现一次的字符。如输入abaccdeff,则输出b。分析:这道题是2006年google的一道笔试题。#include "stdio.h" char FirstNotRepeatingChar(char* pString){ unsigned int i; ...
分类:其他好文   时间:2014-11-17 12:22:31    阅读次数:197
格式转换至yuv422转 yuv420
大意了,每四行计算时,牵引错误,试试下面的代码吧,不过这种代码很有优化的余地书籍可以参考“视频技术手册”,上面有YUV422到YUV420采样转换的讲解C/C++ codeint YUV422To420(unsigned char *pYUV, unsigned int *yuv, int lWid...
分类:其他好文   时间:2014-11-17 00:14:09    阅读次数:328
生成随机数
#include #include #include void main() { srand( (unsigned)time( NULL ) ); for(int i=0;i<100000;i++) { ...
分类:其他好文   时间:2014-11-15 23:02:02    阅读次数:240
数据写入文件
//生成N个小于N的随机数,存入数组avoid RandToFile(int *a){ srand( (unsigned)time( NULL ) ); //初始化随机数 for(int i=0;i<N;i++) { a[i]=(int)rand()%N; } FILE *...
分类:其他好文   时间:2014-11-15 22:55:54    阅读次数:195
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!