码迷,mamicode.com
首页 >  
搜索关键字:unsigned    ( 4409个结果)
字符串转换为数字
int 型数据的范围:-2^31~2^31-1(-2147483648~2147483647)unsigned int: 0~2^321.自己写的函数,注意特殊情况的考虑#include using namespace std;#include //包含整型数的范围限制int St...
分类:其他好文   时间:2015-05-04 19:35:21    阅读次数:111
leetcode 190 Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 00111001011110...
分类:其他好文   时间:2015-05-04 18:18:59    阅读次数:71
DB开发之mysql
1. MySQL 4.x版本及以上版本提供了全文检索支持,但是表的存储引擎类型必须为MyISAM,以下是建表SQL,注意其中显式设置了存储引擎类型CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KE...
分类:数据库   时间:2015-05-04 15:18:15    阅读次数:139
VC环境下整型转换为字符串型(2)
在串口下位机的发送中,可能会用到需要发送数字,显示为字符串型的 和上一篇文字《串口中字符串转换为整型》一正一反,知识点学习会了: #include #include #include   void inttostr(int m,unsigned char * str) { int length=0;   int tmp,temp; //临时变量   temp=m;      ...
分类:其他好文   时间:2015-05-03 19:04:16    阅读次数:123
结构体内包含位段,其数据内存分布
struct _PACKER_DATA{ unsigned char IsDLL :1; // 是否为DLL unsigned char Config :3; // 设置 unsigned char OldOEP :4; // 程序入口点 ...
分类:其他好文   时间:2015-05-03 18:59:24    阅读次数:129
赛码"BestCoder"杯中国大学生程序设计冠军赛
渣渣一枚 总共做了4个题目.先总结下吧.题目质量很高. 题目链接 1001 这个题目第一眼就是hdu之前的题目今年暑假不AC.只选三个,那么就是左右两边贪心取优. #include #include #include #include #define MOD 4294967296 using namespace std; typedef unsigned int LL; int...
分类:其他好文   时间:2015-05-03 12:08:40    阅读次数:203
数据类型的溢出
1. 如何自己计算得到边界值 注:整数常量的数据类型默认为:能表示该数的最小数据类型。 以下从小到大排列,选择表中能够表示该整数常量的第一个数据类型(如 8 选 int,2^32+10 选 long int) - 10进制常量可选:int, long int, long long int - 8进制或16进制常量可选:int, unsigned int,long int,unsigned...
分类:其他好文   时间:2015-05-03 12:04:07    阅读次数:380
编程小常识
1 以前以为memset是给一个数组赋初值,实际上呢?void *memset(void *s, int ch, unsigned n);将s所指向的某一块内存中的每个字节的内容全部设置为ch指定的ASCII值,块的大小由第三个参数指定,这个函数通常为新申请的内存做初始化工作,其返回值为指向S的指针...
分类:其他好文   时间:2015-05-02 20:40:29    阅读次数:144
MySQL类型属性Unsigned与ZeroFill
1. Unsigned 就是将数字类型无符号化。int的类型范围是-2147483648~2147483647, int unsigned的类型范围是0~4294967295Unsigned也可能带来负面的影响,例如:CREATE TABLE T(a int unsigned,b int unsig...
分类:数据库   时间:2015-05-02 18:03:49    阅读次数:146
unsigned long long类型与long long类型
最近做题的时候,经常遇到范围是2^63,取模2^64的这种题目。遇到这种限制条件时就要想到用unsigned long long类型。 可以简洁地声明为typedef unsigned long long ull。这样,如果ull类型的整数溢出了,就相当于取模2^64了。因为ull的范围是[0,2^64-1]。 而ll的范围是[-2^63,2^63-1],因为有符号的第63位表示“正负”而不表...
分类:其他好文   时间:2015-05-02 16:42:00    阅读次数:130
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!