#include#include#include#include#includeusing namespace std;#define MAXN 100001typedef unsigned long long ull;const ull seed=31;ull seeds[MAXN];char s...
分类:
编程语言 时间:
2014-12-27 11:22:56
阅读次数:
189
变量的修饰符 1、修饰长度(针对64位操作系统) int 4字节 short 2字节 %hd long 8字节 %ld long long 8字节 %lld unsigned int 4字节 %u unsigned short 2字节 %hu unsigned long 8字...
分类:
编程语言 时间:
2014-12-27 01:27:29
阅读次数:
299
1.用typedef定义类型名
typedef 的使用
关键字typedef用来为已经存在的数据类型定义一个“别名”,使程序“更具有”可读性。
例如: typedef unsigned int uint;
typedef int * ptrint;
typedef struct stu_inf...
分类:
编程语言 时间:
2014-12-26 20:23:12
阅读次数:
182
使用结构体操作寄存器://寄存器赋值和取值的时候,要注意寄存器的长度,有的寄存器的值只有8位。//还要注意,使用volatile修饰寄存器变量。//addr.htypedef unsigned int S3C24X0_REG32;/* NAND FLASH (see S3C2410 manual c...
分类:
其他好文 时间:
2014-12-26 18:14:36
阅读次数:
262
linux 设备驱动之IOCTRL
1,where come from?
ioctrl(或者说unlocked_ioctl/compat_ioctl)是file_operations结构体的函数指针
struct file_operations {
...
long (*unlocked_ioctl) (struct file *, unsigned i...
分类:
系统相关 时间:
2014-12-25 20:34:47
阅读次数:
452
一。-(NSString *)md5:(NSString *)str { const char *cStr = [str UTF8String];//转换成utf-8 unsigned char result[16];//开辟一个16字节(128位:md5加密出来就是128位/bit)的...
分类:
其他好文 时间:
2014-12-25 18:14:50
阅读次数:
129
将两个c函数从cpp文件中分离出来单独放入一个c文件中,报了下面的错: Undefined symbols for architecture armv7: ? "MyEncrypt(unsigned char*, int, unsigned char*, int*, unsigned char*)", referenced fro...
分类:
其他好文 时间:
2014-12-25 16:37:33
阅读次数:
1133
在大端机器(solaris-sparc,hpux-hppa)上从奇数内存地址取一个整形(2 or 4 bytes)会崩溃。如:unsigned short Res = *(unsigned short *) tmpArray;应该: char tmpArray[sizeof(unsigned sho...
分类:
其他好文 时间:
2014-12-24 16:08:51
阅读次数:
188
1 概述计数信号量集semid_ds:struct semid_ds{ struct ipc_perm sem_perm; struct sem *sem_base; //指向信号量结构数组 unsigned short ...
分类:
其他好文 时间:
2014-12-23 17:07:00
阅读次数:
199
话不多说,直接上代码。
#include
using namespace std;
int main()
{
unsigned int *data = new unsigned;
unsigned char *byte;
*data = 0x000000ff;
cout<<*data<<endl;
byte = (unsigned ch...
分类:
编程语言 时间:
2014-12-23 15:38:01
阅读次数:
148