码迷,mamicode.com
首页 >  
搜索关键字:unsigned    ( 4409个结果)
格式化字符串
%u为以无符号十进制输出 无符号整数能表示的数范围是0-65535,即对应的二进制数0-1111111111111111(16个1)。%ld表示按十进制长整型输出%x,%X无符号以十六进制表示的整数%u,格式化字符串时用的,u表示格式化为无符号整数(unsigned int) 举例来...
分类:其他好文   时间:2014-07-29 12:10:56    阅读次数:253
测温补偿测试程序
#include#include#define uchar unsigned char#define R1 10000 // the value of standard resistor is 10000#define c 0.0001// theroy current#define Vref 2....
分类:其他好文   时间:2014-07-29 11:54:26    阅读次数:213
模板:函数memset
需要的头文件 or memset函数介绍void *memset(void *s, int ch, size_t n);函数解释:将s中前n个字节 (typedef unsigned int size_t)用 ch 替换并返回 s 。memset:作用是在一段内存块中填充某个给定的值,它是对较大的....
分类:其他好文   时间:2014-07-29 10:40:56    阅读次数:218
Qt中将float转换成unsigned short类型
在用Qt开发应用程序时有时候需要将float类型转换为unsigned short类型的。如果进行强制类型转换,那么会出现精度损失的问题,使数据变得不正确。那么可以通过先将float类型的转换为QString类型的,QString sNum = QString::number(fNum);然后调用s...
分类:其他好文   时间:2014-07-28 23:47:04    阅读次数:418
从LLVM源码学C++(四)
关键知识点:断言1 const Option OptTable::getOption(OptSpecifier Opt) const {2 unsigned id = Opt.getID();3 if (id == 0)4 return Option(0, 0);5 assert...
分类:编程语言   时间:2014-07-28 21:22:24    阅读次数:290
循环校验码
程序: // X16+X12+X5+1 : 1,0001,0000,0010,0001 :0x11021 unsigned char crcbuff [] = { 0x00,0x00,0x00,0x00,0x06,0x0d,0xd2,0xe3}; unsigned int crc; // CRC 码 void main(void) { unsigned char *ptr; crc ...
分类:其他好文   时间:2014-07-28 16:09:43    阅读次数:263
截取字符串
char *strrchr( const char *string, int c );char *wcsrchr( const wchar_t *string, int c );int _mbsrchr( const unsigned char *string, unsigned int c );R...
分类:其他好文   时间:2014-07-27 09:42:22    阅读次数:201
Linux下模拟一个简易的消息机制
声明 #define?MSG_ERROR? -1 #define?MSG_SUCCEED 0 #define?MSG_TRUE 1 #define?MSG_FALSE 0 #define?PM_NOREMOVE??? 0x00 #define?PM_REMOVE??? 0x01 typedef?unsigned?long? WPARAM; ...
分类:系统相关   时间:2014-07-26 03:33:27    阅读次数:365
根据IP和Mask获得子网地址
根据IP和Mask获得子网地址unsigned int IPToUInt(const char *pIp){ int a,b,c,d; unsigned int addr=0; if( sscanf(pIp,"%d.%d.%d.%d",&a,&b,&c,&d)!=4 ) ...
分类:其他好文   时间:2014-07-26 00:20:16    阅读次数:339
在C语言中,double、long、unsigned、int、char类型数据所占字节数
和机器字长及编译器有关系:所以,int,long int,short int的宽度都可能随编译器而异。但有几条铁定的原则(ANSI/ISO制订的): 1 sizeof(short int)<=sizeof(int) 2 sizeof(int)<=sizeof(long int) 3 short in...
分类:编程语言   时间:2014-07-25 19:11:02    阅读次数:280
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!