09 2015 档案
摘要:#include #include "link.h"void print_item(link p){ printf("%d\n", p->item);}int main(void){ link head, tail, p; //struct node *head; l...
阅读全文
摘要:#include #include "link.h"void print_item(link p){ printf("%d\n", p->item);}int main(void){ link head, p; //struct node *head; link_in...
阅读全文
摘要:#include #include "queue.h"int main(void){ char *s = "abcd"; while (*s != '\0') enqueue(*s++); while (!is_empty()) putchar(dequ...
阅读全文
摘要:中缀:3+5后缀:3 5 +3+4*2-1 转后缀为 4 2 * 3 + 1 -#include #include #include #include "stack.h"int reversed_cal(char *s){ int res = 0, a, b; char *p = s; ...
阅读全文
摘要:main.c 文件#include #include "stack.h"int main(void){ char *str = "abcdefghijklmn"; init_stack(3); //创建动态栈 while (*str != '\0') { ...
阅读全文
摘要:#include struct STU { int id; char name[20]; char sex;};int main(void){ struct STU b = {10, "xwp", 'm'}; struct STU a; a = b; pri...
阅读全文
摘要:#include //指针数组练习int main1(void){ //int a[10]; char* arry[3] = {"hello", "world", "itcast"}; //char arry[3][20] = {"hello", "world", "itc...
阅读全文
摘要:#include int add(int a, int b){ printf("%d\t%d\n", a, b); return a+b;}char max_ch(char *str){ int max, i; max = 0; for (i = 0; str[i] !...
阅读全文
摘要:#include int main1(void){ int a = 3; int b = 8; int *p = &a; // int* p = &a; int **q; // int** q; q = &p; **q = 10; *...
阅读全文
摘要:#include #include #include void show_arry(int a[], int n){ int i; for (i = 0; i y;}void swap_int(void *a, void *b){ int tmp; tmp = *((int...
阅读全文
摘要:#include int main(void){ char *p[10]; printf("%d\t%d\n", sizeof(p), sizeof(*p)); return 0;}
阅读全文
摘要:#include /*通过回调函数的性质模拟早晨被叫醒的场景注意:闹钟和父母的行为是被抽象的共同的行为是,到一个时间点被触发。*//************************************************************************//* 定义回调函数 ...
阅读全文
摘要:#include #define A 0int funcA(int a, int b){ return a + b;}/*把指针作为函数的返回值*/int * funcB(int a, int b){ static int c = A; c = a + b; return &...
阅读全文
摘要:#include void funcA(int *p_int_a, int int_b){ *p_int_a = 100; int_b = 200; printf("funcA: *p_int_a = %d, int_b = %d \n", *p_int_a, int_b); ...
阅读全文
摘要:#include /*声明一个函数,函数名称的本质就是一个函数指针*/int funcA(int a, int b){ int c = a + b; printf("a = %d, b = %d \n", a, b); return c;}/*声明一个函数指针*//*注意,函数指针...
阅读全文
摘要:指针与函数1、指针与函数的返回值2、指针和函数的参数 函数传参的两种方式:传值和传址如果是传值,在被调函数内部不能改变主调函数变量的值。如果是传址,在被调函数内部可以通过地址来操作外部的变量。3、函数指针指向函数的指针函数名称本身就是一个函数指针。比如:int (*p_func)(int)第一个in...
阅读全文
摘要:#include #include #include #define N 10void init_arry(int a[], int n){ int i; srand(time(NULL)); for (i = 0; i a[j+1]) swa...
阅读全文
摘要:#include #include #include #include #include void generate(char computer[]){ int i = 0, j, t; srand(time(NULL)); while (i 0) { putcha...
阅读全文
摘要:#include #include int main(void){ //char dest[10]; //#define NULL (void *)0 //char *dest = NULL; //dest是野指针,指向的区域没有可读写空间 //char...
阅读全文
摘要:字符串数组指针和数组等价转换void foo(int *p,int n){ int i; for(i=0;i<n;i++) { printf("%d\n",p[i]); //printf("%d\n",*(p+i)); }}void main(){...
阅读全文
摘要:(类型)变量/常量c语言运算符算数运算符 + - * / % 5%-3 -5%3关系运算符 > = 71111 -> Fint a[10];a 表示地址,首元素地址a[0] a[1] a[2]a[3] a + 12BYTE循环语句while表达式1;while(表达式2){ 语句。。。; 表达式3...
阅读全文
摘要:1.宏替换,完全展开替换,注意带来副作用#include #define 打印语句 printf(“hello”);Void main(void){ If (1) 打印语句;; Else ….;}Void main(void){ If (1) printf(“hello”); ; Else ….;}...
阅读全文
摘要:void foo(int *p,int n){ int i; for(i=0;i<n;i++) { printf("%d\n",p[i]); //printf("%d\n",*(p+i)); }}void main(){ int a[10];...
阅读全文
摘要:#include #include #include #define N 10/* 初始化一个数组*/void init_array(int a[], int n) { int i; srand(time(NULL)); for (i = 0; i a[j]) ...
阅读全文
摘要:标准C语言头文件 ISO C标准定义的头文件(24项) 验证程序断言 支持复数算术运算 字符类型 出错码 浮点环境 浮点常量 整型格式转换 替代关系操作符宏 实现常量 局部类别 数学常量 非局部goto 信号 ...
阅读全文
摘要:C语言32个关键字第一类:数据类型关键字A基本数据类型(5个)void声明函数无返回值或无参数,声明无类型指针,显式丢弃运算结果。char字符型类型数据,属于整型数据的一种。int整型数据,通常为编译器指定的机器字长。float单精度浮点型数据,属于浮点数据的一种,小数点后保存6位。dou...
阅读全文
摘要:Ubuntu linux 环境基本使用开启一个终端CTR+ALT+t关闭一个终端ALT+f4 exitshell:单词语义贝壳,计算机语义命令解释器。shell提示符#:一般表示你是超级用户,root$:一般表示你是普通用户清除屏幕clear 快捷键CTR+l察看当前目录下有哪些文件ls察看当前目录...
阅读全文
摘要:程序编译链接原理预处理:.c -> .i gcc -E hello.c -o hello.i编译:.i / .c -> .sgcc -S hello.i -o hello.s汇编:.s -> .ogcc -c hello.s -o hello.o链接:.o -> 可执行程序appgcc hel...
阅读全文
摘要:#include #include #define 开始吧 main#define 空既是空 void#define 执行一下吧 system#define 打印 printf空既是空 开始吧(){ 打印("锄禾日当午,学C真他妈苦"); system("note...
阅读全文
摘要://// HMPaintView.h// 画板//// Created by YaguangZhu on 15/9/10.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//#import @interface HMPaintVi...
阅读全文
摘要://// UIImage+Tools.h// 截屏//// Created by YaguangZhu on 15/9/10.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//#import @interface UIImage...
阅读全文
摘要://// UIImage+UItool.h// 图片裁剪//// Created by YaguangZhu on 15/9/10.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//#import @interface UIIm...
阅读全文
摘要://// ViewController.m// 水印//// Created by YaguangZhu on 15/9/10.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//#import "ViewController.h...
阅读全文
摘要://// HMview.h// 雪花飘落效果//// Created by YaguangZhu on 15/9/9.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//#import @interface HMview : UI...
阅读全文
摘要:新建一个类 HM imageView 类似于系统自带的UI imageview 效果是一样的//// HMUIimageView.h// 模仿imageView的底层实现//// Created by YaguangZhu on 15/9/9.// Copyright (c) 2015年 Y...
阅读全文
摘要:没有上下文,没有渲染画图//// HMView.m// UIKit练习//// Created by YaguangZhu on 15/9/9.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//#import "HMView.h...
阅读全文
摘要:和饼图差不多,代码差别不大//// HMPieView.m// 饼图//// Created by YaguangZhu on 15/9/9.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//#import "HMPieView...
阅读全文
摘要://// UIColor+Random.h// 饼图//// Created by YaguangZhu on 15/9/9.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//#import @interface UIColor...
阅读全文
摘要://// HMProgressView.h// 进度条//// Created by YaguangZhu on 15/9/9.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//#import @interface HMProg...
阅读全文
摘要:update point set point.boundry=1 from point,b_point where point.point_x_y=b_point.point_x_y;select count(*) from point,b_point where point.point_x_y=...
阅读全文
摘要:jdk安装的时候不能喝jre安装在一起另外 eclipse和 jdk的版本要一致最后就是环境变量的配置了 总的来说蛮简单的不像以前觉得那么复杂高深
阅读全文
摘要:首先Xcode6 不允许新建空项目 所以Xcode 6 正式版如何创建一个Empty Application|浏览:6435|更新:2015-07-10 11:221234567分步阅读Xcode 6 正式版里面没有Empty Application这个模板,这对于习惯了纯代码编写UI界面的程序员来...
阅读全文
摘要:两个按钮//// HMPerson.h// 08-自定义对象归档//// Created by yz on 14-8-29.// Copyright (c) 2014年 iThinker. All rights reserved.//#import @interface HMPerson :...
阅读全文
摘要:两个按钮- (IBAction)save:(id)sender { // [NSUserDefaults standardUserDefaults]可以直接操作偏好设置文件夹 NSUserDefaults *defaults = [NSUserDefaults standardU...
阅读全文
摘要:两个按钮// 当点点击保存的时候调用- (IBAction)save:(id)sender { // 获取沙盒的根路径// NSString *home = NSHomeDirectory(); // 拼接Documents路径// NSString *docPath...
阅读全文
摘要:这个demo 有多个页面 并涉及顺传和逆传而且还有一个第三方库的导入 来实现自定义提示消息的特效利用代理来实现页面间的传值一个页面代表一个controller这次 ViewController 反而一句代码都没写//// HMContact.h// 私人通讯录//// Created by Y...
阅读全文
摘要://// MJApp.h// 预习-03-app管理//// Created by MJ Lee on 14-4-3.// Copyright (c) 2014年 itcast. All rights reserved.//#import @interface MJApp : NSObjec...
阅读全文
摘要:主要是 点击按钮实现下拉 刷新数据页面间传值//// HMFriendsModel.h// QQ好友列表//// Created by YaguangZhu on 15/9/1.// Copyright (c) 2015年 YaguangZhu. All rights reserved.//...
阅读全文
摘要:/*** 当一个控件没有显示出来的时候1. 父控件的frame2. 当前控件frame3. 当前控件 hidden (是否为yes )4. alpha < = 0.01*/
阅读全文

浙公网安备 33010602011771号