1.表达式中的转换。当同一个表达式中包含两种不同的算术类型时,C++将执行两种自动转换:首先, 一些类型中出现时会自动转换:其次,有些类型中与其他类型同时出现是在表达式中时,将被转换 先看自动转换,在计算表达式时,C++将boll,char,unsigned,char,signedchar和shor ...
分类:
编程语言 时间:
2016-08-11 17:41:36
阅读次数:
158
题目: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32- ...
分类:
其他好文 时间:
2016-08-10 11:04:27
阅读次数:
172
Regionals 2002 >> Asia - Dhaka
问题链接:UVALive2701 UVA1189 POJ1426 ZOJ1530 Find The Multiple。
问题简述:输入若干个正整数n,n=0则结束。对于输入的n,输出正整数m,m是n的倍数并且只包含数字0和1。
问题分析:所求的值不是很大的话,用类型unsigned long long就可以了。开始时,先用1试...
分类:
其他好文 时间:
2016-08-10 07:41:46
阅读次数:
238
1、对于信号几种赋值方式的区别: 2、随机数方法和函数 $urandom_range() 语法:$urandom_range(int unsigned maxval,int unsigned minval = 0); 功能:返回一个在maxval和minval之间的无符号整数 Example: $u ...
分类:
其他好文 时间:
2016-08-09 13:35:58
阅读次数:
1031
一、32位编译器: char :1个字节 char*(即指针变量): 4个字节(32位的寻址空间是2^32, 即32个bit,也就是4个字节。同理64位编译器) short int : 2个字节 int: 4个字节 unsigned int : 4个字节 float: 4个字节 double: 8个 ...
分类:
其他好文 时间:
2016-08-09 09:25:19
阅读次数:
150
poll函数和select函数非常相似,但是函数接口不一样。 #include <poll.h> int poll(struct pollfd *fdarray, unsigned long nfds, int timeout); 返回:就绪描述字的个数,0-超时,-1-出错 第一个参数是指向一个结 ...
分类:
其他好文 时间:
2016-08-08 06:24:19
阅读次数:
100
--创建数据表php41_goods商品表create table php41_goods( goods_id mediumint unsigned not null auto_increment comment '主键', goods_name varchar(32) not null comme ...
分类:
数据库 时间:
2016-08-07 16:45:20
阅读次数:
474
CleverCode发现可以通过source来执行一个.sql文件。
1)?显示帮助。source (\.) Execute an SQL script file. Takes a file name as an argument.
2 test.sql文件
CREATE TABLE `tab_test` (
`id` bigint(20) unsigned...
分类:
数据库 时间:
2016-08-07 12:31:55
阅读次数:
420
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur ...
分类:
其他好文 时间:
2016-08-06 17:19:28
阅读次数:
138
前言 最近自学51单片机,编程中如流水灯等非精确延时多用软件延时实现,写了几个类似DelayX10us(unsigned char x)的函数方便调用,函数内部的语句多是用官方延时程序再自己套一个for或者do..while循环改造而成,像这样: 由于不懂汇编,所以对代码的实际延时时间一直没有深究, ...
分类:
其他好文 时间:
2016-08-05 15:28:33
阅读次数:
192