原地址:http://www.cnblogs.com/U-tansuo/p/ios_basis_info.html1、获取设备类型 (Iphone/ipad
几?)#import "sys/utsname.h"-(NSString*)getDeviceVersion{ struct utsname ...
分类:
移动开发 时间:
2014-05-12 17:44:02
阅读次数:
546
一.内存对齐的初步讲解内存对齐可以用一句话来概括:“数据项只能存储在地址是数据项大小的整数倍的内存位置上”例如int类型占用4个字节,地址只能在0,4,8等位置上。例1:#include
struct xx{ char b; int a; int c; char d;};int main(){ st...
分类:
其他好文 时间:
2014-05-10 19:52:54
阅读次数:
323
BFS。wa了一下午,原来是YES,写成了Yes。 1 #include 2 #include 3
#include 4 #include 5 using namespace std; 6 7 typedef struct node_st{ 8 int x,
y; 9 in...
分类:
其他好文 时间:
2014-05-06 08:48:16
阅读次数:
274
typedef和define的详细区别2011-04-19 15:11 firnow
firnow字号:T|T对于都可以用来给对象取一个别名的Typedef和define来说,是有区别的。本文通过对typedef和define的介绍,来给读者详细的讲解它们存在的本质区别,供参考。AD:51CTO学院...
分类:
其他好文 时间:
2014-05-06 00:50:29
阅读次数:
359
epoll函数#include int epoll_create(int size)int
epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)int epoll_wait(int
epfd,struct epoll_event...
分类:
其他好文 时间:
2014-05-06 00:21:30
阅读次数:
519
题目链接区间合并,贪心,需要注意边界情况,LeetCode的数据还是比较好的,这样才能写出健壮的程序。附上代码:
1 /** 2 * Definition for an interval. 3 * struct Interval { 4 * int start; 5 *
in...
分类:
其他好文 时间:
2014-05-06 00:16:44
阅读次数:
400
输入子系统在内核中的位置:/driver/input
drivers/input/input.c: input_init ---> err = register_chrdev(INPUT_MAJOR,
"input", &input_fops); static const struct file_o...
分类:
其他好文 时间:
2014-05-05 23:34:42
阅读次数:
516
typedef不常见但值得一提的用途:
1. 用typedef来定义与平台无关的类型。
比如定义一个叫 REAL 的浮点类型,在目标平台一上,让它表示最高精度的类型为:
typedef long double REAL;
在不支持 long double 的平台二上,改为:
typedef double REAL;
在连 double 都不支持的平台三上,改为:
typedef ...
分类:
其他好文 时间:
2014-05-03 16:12:35
阅读次数:
289
1、#include指令包含指定的文件2、#define指令预定义,通常用它来定义常量(包括无参量与带参量),以及用来实现那些“表面似和善、背后一长串”的宏,它本身并不在编译过程中进行,而是在这之前(预处理过程)就已经完成了3、#typedef指令常用来定义一个标识符及关键字的别名它是语言编译过程的...
分类:
其他好文 时间:
2014-05-02 12:45:20
阅读次数:
280
内容如下:
#include "cocos2d.h"
#include "cocostudio/CocoStudio.h"
//精灵猫和其他精灵的tag
typedef enum{
catTag =1,
};
//cocostudio 动画帧tag
typedef enum{
catWalkTag = 1001,
};
class Base :public coco...
分类:
其他好文 时间:
2014-05-02 05:08:11
阅读次数:
319