上一页 1 ··· 3 4 5 6 7
摘要: 在C语言中,对变量的存储类型说明有以下四种: auto 自动变量 (动态存储) register 寄存器变量(动态存储) extern 外部变量(静态存储) static 静态变量(静态存储) 所谓存储类型是指变量占用内存空间的方式,也称为存储方式。 这4种类型 不允许重复定义 如: extern 阅读全文
posted @ 2018-03-09 10:58 王默默 阅读(4331) 评论(0) 推荐(0) 编辑
摘要: 变量从高到低的优先级以下面展示: 1.文件作用域;变量在全局从文件开头到结尾一直有效即全局变量 2.函数作用域也称局部变量 3.代码块作用域;用{}花括号内的定义的变量;都是在代码块{}中有效 如:if while dowhite for 循环的代码块 4.函数原型也就是函数的声明作用域;那变量只在 阅读全文
posted @ 2018-03-09 09:38 王默默 阅读(576) 评论(0) 推荐(0) 编辑
摘要: 总结: 常量指针:常量的值即存储单元的值不可以修改;地址可以修改。 指针常量:指针地址不可以修改; 指针指向的存储单元可以被修改。 指向常量的指针常量:地址和存储单元的值都不可以被修改。 阅读全文
posted @ 2018-03-08 14:16 王默默 阅读(250) 评论(0) 推荐(0) 编辑
摘要: //数组变量名;就是一个地址;就是数组首元素的地址#include int main(void) { int age[5] = {10,50,100,22,44}; //正确 //int * p = &age[0];//不能赋值age数组名是常量不允许赋值 //正确 int * p = age;//数组名就是一个地址;就是数组a[0] 的地址;即是数组的首地址 printf... 阅读全文
posted @ 2018-03-04 22:23 王默默 阅读(2107) 评论(0) 推荐(0) 编辑
摘要: #include int main(void) { int a=10; int *p = &a; *p = 89; printf("变量值a=%d a=%d\n", a,*p);//0x7fff8af18554 printf("指针地址p=%p p=%p\n",p,&a);//0x7fff8af18554 printf("指针地址p=%#lx p=%#lx\n"... 阅读全文
posted @ 2018-03-03 21:39 王默默 阅读(6152) 评论(0) 推荐(0) 编辑
摘要: #include int main(void){ int age[5] = {5,6,7,20,99}; return 0; } //转换后 /*(gdb) p &age[0] $20 = (int *) 0x7fffffffe330 对应a[0]的地址 (gdb) p &age[1] $21 = (int *) 0x7fffffffe334 (gdb) p &age[2] $... 阅读全文
posted @ 2018-03-02 14:21 王默默 阅读(1602) 评论(0) 推荐(0) 编辑
摘要: ASCII值控制字符ASCII值控制字符ASCII值控制字符ASCII值控制字符 0 NUT 32 (space) 64 @ 96 、 1 SOH 33 ! 65 A 97 a 2 STX 34 " 66 B 98 b 3 ETX 35 # 67 C 99 c 4 EOT 36 $ 68 D 100 阅读全文
posted @ 2018-03-02 14:01 王默默 阅读(1015) 评论(0) 推荐(0) 编辑
摘要: 本文写给主要工作在Windows操作系统下而又需要开发一些跨平台软件的程序员朋友,以及程序爱好者。 GDB是一个由GNU开源组织发布的、UNIX/LINUX操作系统下的、基于命令行的、功能强大的程序调试工具。 GDB中的命令固然很多,但我们只需掌握其中十个左右的命令,就大致可以完成日常的基本的程序调 阅读全文
posted @ 2018-03-02 13:57 王默默 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 输出结果 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 阅读全文
posted @ 2018-03-01 21:41 王默默 阅读(685) 评论(0) 推荐(0) 编辑
摘要: #include int main(void) { /* 选择排序算法 原理:从数组中 找出最小的元素然后交换位置; */ int a[10] = {9,5,10,7,2,3,1,6,8,4}; int i=0,j=0; int n = sizeof(a)/4; //外循环n-1轮 for(i=0;i<n-1;i++){ int pos = i;//始终指向最小的位... 阅读全文
posted @ 2018-02-28 22:51 王默默 阅读(1049) 评论(0) 推荐(0) 编辑
摘要: #include /* 十六进制转换成十进制:要从右到左用二进制的每个数去乘以16的相应次方; 在16进制中:a(A)=10 b(B)=11 c(C)=12 d(D)=13 e(E)=14 f(F)=15 例如:CE=12*16^1+14*16^0=192+14=206 */ //右旋转把第一位 放到最后 0x2345 => 0x3452 num左移1位0x3450;即1个16进制位等于4个... 阅读全文
posted @ 2018-02-26 23:22 王默默 阅读(2913) 评论(0) 推荐(0) 编辑
摘要: 一:无参函数 类型说明符 get(){ //函数体 } 二:无参函数 类型说明符 getname(int a,int b){ //函数体 } 三:类型说明符包括: int ,char,float,double, void, static 四、函数的调用 直接使用函数名调用;实参(常量,变量,表达式, 阅读全文
posted @ 2018-02-26 16:05 王默默 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 一、函数的特点: 全部都是全部函数构成 面向过程的;是函数式语言 函数的调用 是按需调用 封装包含 二、程序中函数的作用: 可以使用函数使程序变的简短 和 清晰 提高代码重用性 提高开发效率 有利于程序维护 三、函数的划分: 库函数:系统提供 用户定义的函数:由用户声明和定义的函数 四、函数的返回类 阅读全文
posted @ 2018-02-26 15:52 王默默 阅读(233) 评论(0) 推荐(0) 编辑
摘要: #include int main(void){ //利用移位运算符 把十进制转换成二进制 int c; printf("输入数字:");//8 scanf("%d",&c); //最高位和次高位都要移动到最低位 //补码:00 0000 1000 //逻辑右移>>:00 0000 1000 //printf("%d",8=0;i--){ int bit = (c>>... 阅读全文
posted @ 2018-02-26 15:23 王默默 阅读(2121) 评论(0) 推荐(1) 编辑
摘要: #include int main(void){ int a,n; printf("pls input number:\n"); scanf("%d",&a); n = sizeof(a); int i,c=0; char j[8]; i = a/2; while(i!=0){ j[c]= a%2; a = a/2; c = c+1; } while(c>0... 阅读全文
posted @ 2018-02-26 14:25 王默默 阅读(1335) 评论(0) 推荐(0) 编辑
摘要: #include int main(void) { //位运算符 & | ^ ~ printf("8|2=%d\n",8|2);// 10 printf("12&6=%d\n",12&6);//4 printf("12^6=%d\n",12^6);//4 printf("~8=%d\n",~227);//-228 printf("12&&2=%d\n",12&&6);//1... 阅读全文
posted @ 2018-02-25 22:03 王默默 阅读(584) 评论(0) 推荐(0) 编辑
摘要: #include int main(void) { //for循环实现9*9乘法表 /* 1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9 */ int temp,i,j; for(i=1; i<10; i++){ for(j=1;j<=i;j++){ temp = j*i; // if(temp<10){ printf("%... 阅读全文
posted @ 2018-02-25 18:29 王默默 阅读(2714) 评论(0) 推荐(0) 编辑
摘要: #include int main(void) { int i=0, j =0, k= 0, line; printf("请输入金字塔的总行数:"); scanf("%d",&line); //外层控制总行数 while( ii ) { printf(" "); j--; //j = j-1; } k = 0;//控制输出多少个* //控制输出* 有... 阅读全文
posted @ 2018-02-25 12:12 王默默 阅读(5000) 评论(0) 推荐(0) 编辑
摘要: #include int main(void) { //提供变量 cmd balance(余额) deposit(存款) withdraw(取款) //利用while做死循环 int cmd; float balance=0.0f, deposit, withdraw; printf("------【陈大纯简单的银行存取款程序】请输入如下数字命令-----\n"); printf... 阅读全文
posted @ 2018-02-25 11:00 王默默 阅读(4045) 评论(0) 推荐(0) 编辑
摘要: /** 只读变量和常量 const 只读 const int a; int const a;//同上面的代码行是等价的,都表示一个常整形数。 int *const a;//const具有"左结合"性,即const修饰*,那么,不难理解,该句表示一个指向整数的常指针,a指向的整数可以修改,但指针a不能修改。 const int *a;//与下面的这一行等价,根据"左结合"性,const修饰的是(... 阅读全文
posted @ 2018-02-24 18:06 王默默 阅读(2376) 评论(0) 推荐(0) 编辑
摘要: 案例一:#include int main(void){ int a[5]; printf("please input sort number:"); int k; for(k=0;ka[j+1]){ //大的放后面 int temp; temp = a[j]; a[j] = a[j+1];//放最小的 a[j+1] = temp; ... 阅读全文
posted @ 2018-02-24 11:26 王默默 阅读(1279) 评论(0) 推荐(0) 编辑
摘要: DELPHI者,经典开发工具、美奂美仑之开发环境也。 盖论DELPHI其身世,实为神界之神物,后借宝蓝公司之手,于1990年代,现于江湖。 DELPHI一出江湖,码农爱之,企业爱之。一时间,风雨雷动,群雄为之叹服,奸商为之苦脸,微软为之微软。 后江湖传说“真正码农用C++,聪明码农用DELPHI”。 阅读全文
posted @ 2018-02-16 20:53 王默默 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 1 (function(){ 2 var doc=document, 3 ua = navigator.userAgent.toLowerCase(), 4 check = function(r){return r.test(ua);}, 5 isOpera = check(/opera/), 6 isChrom... 阅读全文
posted @ 2018-01-03 14:47 王默默 阅读(657) 评论(0) 推荐(0) 编辑
摘要: phalcon: 获取参数的方法 一般情况下:GET/POST 1 2 $this->request->get(参数); $this->request->getPost("参数") 1 2 $this->request->get(参数); $this->request->getPost("参数") 阅读全文
posted @ 2017-12-28 15:51 王默默 阅读(3439) 评论(0) 推荐(0) 编辑
摘要: 让 zend studio 识别 Phalcon语法并且进行语法提示https://github.com/phalcon/phalcon-devtools/tree/master/ide下载解压后,把里面 phalcon 整个目录复制到 workspace 的C:\Documents and Set... 阅读全文
posted @ 2014-07-26 02:40 王默默 阅读(418) 评论(0) 推荐(0) 编辑
摘要: /** * Initializes the router * * @param array $options */ protected function initRouter($options = array()) { $config = $this->di['config']; $this->di 阅读全文
posted @ 2014-07-24 09:07 王默默 阅读(1427) 评论(0) 推荐(0) 编辑
摘要: <?php /** * Bootstraps the application */ use Phalcon\DI\FactoryDefault as PhDi, Phalcon\Config as PhConfig, Phalcon\Session\Adapter\Files as PhSessio 阅读全文
posted @ 2014-07-24 09:06 王默默 阅读(1634) 评论(0) 推荐(0) 编辑
摘要: run(array());} catch (\Phalcon\Exception $e) { echo $e->getMessage();} catch (PDOException $e){ echo $e->getMessage();} 阅读全文
posted @ 2014-07-24 09:05 王默默 阅读(442) 评论(0) 推荐(0) 编辑
摘要: 先安装GIT 然后从 git://github.com/phalcon/cphalcon.git 这里下载安装文件 编译完成就可以安装了! 编译chmod -R 777 cphalcon1. 创建从C源扩展遵循这些步骤:自动检测你的架构git clone --depth=1 git://github 阅读全文
posted @ 2014-07-24 09:04 王默默 阅读(1636) 评论(0) 推荐(0) 编辑
摘要: GIT在Linux上的安装和使用简介解压后切换到其目录$ tar xvfj git-1.7.6.tar.bz2$ cd git-1.7.6 使用默认配置进行安装,如果想修改配置,可以使用 ./configure --help 来获取帮助 $ ./configure$ make$ make insta... 阅读全文
posted @ 2014-07-24 09:02 王默默 阅读(335) 评论(0) 推荐(0) 编辑
摘要: phalcon在phpstorm里的配置视频:http://www.tudou.com/programs/view/yXw6e_Rshwk/ 阅读全文
posted @ 2014-01-15 17:41 王默默 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 1.找到httpd.conf 里面;找到# Virtual hosts 开启虚拟机Include conf/extra/httpd-vhosts.conf2 编辑httpd-vhosts.conf,所以我这里的路径是D:\wamp\Apache2\conf\extra。 ServerAdmin phpwork.com DocumentRoot "D:/wamp/www/phpwork" ServerName phpwork.com ServerAlias www.phpwork.com ErrorLog "logs/phpwork.com-error.log&qu 阅读全文
posted @ 2014-01-15 16:38 王默默 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 1:中文官方网站:http://phalconphp.com/zh/ 挺好可以好好看文档可安装http://bullsoft.org/phalcon-docs/这个去查找,这是个部分中文的手册!Phalcon 尝试开发出最快的 PHP 框架。所以,你现在有一个更简单、健壮的方式开发应用程序了,而且完全不用考虑性能问题。 享受编程的快乐吧!测试结果对比:http://bullsoft.org/phalcon-docs/reference/benchmark/hello-world.html 阅读全文
posted @ 2014-01-15 16:12 王默默 阅读(4875) 评论(1) 推荐(0) 编辑
摘要: 1:下载和安装Wampserver2.4-x86.exe 服务器;2:到phalcon官方网站下载对应的dll文件 phalcon_x86_VC9_php5.4.0_1.2.5 我下的是这个版本 所以用的wamp版本的php也是 php 5.4版本;所以没啥问题!3:下载完了dll文件放在 刚安装好的wamp服务器下:因为我安装的是D盘:D:\wamp\bin\php\php5.4.16\ext 放在个路径下就可以了启动服务器查看是否安装成功:说明成功了;4:开始开发第一个程序:http://docs.phalconphp.com/en/latest/reference/tutorial.ht 阅读全文
posted @ 2014-01-15 16:04 王默默 阅读(1285) 评论(0) 推荐(0) 编辑
摘要: 原文出处:http://www.kuqin.com/webpagedesign/20120208/317938.html 这个网站我自己先保存起来;有时间了慢慢看!我们常用的script标签,有两个和性能、js文件下载执行相关的属性:defer和asyncdefer的含义【摘自https://developer.mozilla.org/En/HTML/Element/Script】This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the doc 阅读全文
posted @ 2014-01-13 01:09 王默默 阅读(415) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7