摘要: main(){ int a[5]={1,2,3,4,5}; int *ptr=(int *)(&a+1);printf("%d,%d",*(a+1),*(ptr-1));}答:2,5 *(a+1)就是a[1],*(ptr-1)就是a[4],执行结果是2,5 &a+1不是首地址+1,系统会认为加一... 阅读全文
posted @ 2015-09-09 12:57 阿凡提王 阅读(127) 评论(0) 推荐(0) 编辑
摘要: //my.h#ifndef __1_Header_h#define __1_Header_h#define DEBUG 1#define aa 1#ifdef aa#ifdef DEBUG#define NSLog(FORMAT, ...) fprintf(stderr,"%s\n",[[NSStr... 阅读全文
posted @ 2015-09-08 21:11 阿凡提王 阅读(302) 评论(0) 推荐(0) 编辑
摘要: //解析的东西是数组就用数组接受,是字典就用字典接受//my.h#ifndef __1_Header_h#define __1_Header_h#define DEBUG 1#define aa 1#ifdef aa#ifdef DEBUG#define NSLog(FORMAT, ...) fpr... 阅读全文
posted @ 2015-09-08 16:17 阿凡提王 阅读(164) 评论(0) 推荐(0) 编辑
摘要: /*代理:.......................................................................................【委托方】主动方 持有带协议的id指针,可以使用协议。【代理方】被动方 遵从协议,实现方法。代理:............ 阅读全文
posted @ 2015-09-08 08:31 阿凡提王 阅读(226) 评论(0) 推荐(0) 编辑
摘要: /*就是这*********************************回调函数不是由该函数的实现方法直接调用,而是在特定的事件或条件发生时由另外的一方调用的,用于对该事件或条件进行响应。回调:...................................................... 阅读全文
posted @ 2015-09-08 08:19 阿凡提王 阅读(291) 评论(0) 推荐(0) 编辑
摘要: /*.h#import @interface Person : NSObject@property (nonatomic) int pid;@property (nonatomic,copy) NSString *name;@property (nonatomic) int age;@end*//*... 阅读全文
posted @ 2015-09-07 07:19 阿凡提王 阅读(247) 评论(0) 推荐(0) 编辑
摘要: #import @interface Person : NSObject- (void)test1;- (void)test2:(NSString *)str;@end@implementation Person- (void)test1{ NSLog(@"无参数的对象方法");}- (void)... 阅读全文
posted @ 2015-09-02 18:52 阿凡提王 阅读(219) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2015-09-02 17:23 阿凡提王 阅读(16) 评论(0) 推荐(0) 编辑