上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 48 下一页
摘要: 在语法上没有错误 首先要掌握一点,构造函数、析构函数、虚函数可以声明为内联函数,这在语法上是正确的。 如下面代码是正确的,因为inline同register一样,只是个建议,编译器并不一定真正的内联,在语法上是没有错误的: 123456789101112 classA{public: inlineA() {} inline~A() {} inlinevirtualvoid virtual... 阅读全文
posted @ 2013-06-14 20:18 helloweworld 阅读(2860) 评论(0) 推荐(1) 编辑
摘要: 方法一: $arrayTest[0]=1; $arrayTest[1]=2; $arrayTest[2]=3; 方法二: $a = array(1,2,3); 或 $a = array(3=>”logo”, 32); 键值形式,array[3]为logo array[4]为123 方法三:自定义下标 $arr[“logo”]=”北京”; $arr[“b”]=123; count($arr)... 阅读全文
posted @ 2013-06-14 11:11 helloweworld 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 1234567891011121314151617181920212223242526 classA{};classB : virtualpublicA{};classC : virtualpublicA{};classD : publicB, publicC{};intmain(void){ cout << sizeof(A) << endl; //1 cout << sizeof(B... 阅读全文
posted @ 2013-06-14 11:10 helloweworld 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 条款1:尽量用const和inline而不用#define 本质是你想编译时就检查出错误,还是运行时出错。 const inline是编译期执行,有参数检查等动作,而#define是预编译时执行。 但是不能完全抛弃#define,它可以控制是否编译某段代码。 条款2:尽量用<iostream>而不用<stdio.h> 为什么呢,一个简单的原因是stdio的控制格式实在够烦人的,还有什么原因呢? 作... 阅读全文
posted @ 2013-06-13 13:52 helloweworld 阅读(189) 评论(0) 推荐(0) 编辑
摘要: const PI = 3.14; 阅读全文
posted @ 2013-06-12 22:33 helloweworld 阅读(112) 评论(0) 推荐(0) 编辑
摘要: function myFunName($num1, $num2) { $result = $num1 + $num2; return $resultl; } function是关键字。 funs.php中有需要的函数,其他*.php引用funs.php中的函数时,使用 require ‘funs.php’;即可引用。 阅读全文
posted @ 2013-06-12 22:20 helloweworld 阅读(100) 评论(0) 推荐(0) 编辑
摘要: <!—calculate.php—><html><head><title>计算器</title></head><body><form action="result.php" method="post"><table border="1"> <tr><td>第一个数</td><td><input type="text" name="num1&quo 阅读全文
posted @ 2013-06-12 22:01 helloweworld 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1、基本思想:数据和样式分离。 简单理解:div是存放数据的容器,css是div中的内容如何显示,包括这些内容的位置和外观。 test.html文件 <html><head><title>test</title><!-- 引入css --><link rel="stylesheet" type="text/css" href="my.css"> </link></head> <body><!--... 阅读全文
posted @ 2013-06-12 21:04 helloweworld 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1、定义一个变量。 定义变量以$开头。 如: $val = 2; 2、变量名区分大小写。 3、基本数据类型。 3.1整型 3.2小数型 不区分单精度 双精度 3.3布尔型 3.4字符串型 4、复合数据类型。 4.1数组 4.2对象 5、特殊数据类型。 null 资源类型 6、定义字符串时,可以用单引号,也可以用双引号。 <?php $v1 = "hello"; $v2 =... 阅读全文
posted @ 2013-06-12 21:03 helloweworld 阅读(125) 评论(0) 推荐(0) 编辑
摘要: (1) <?php//php code?><?php?><h1>php中插入html</h1><?php?>(2)<script laguage=”php”>echo “<br>php测试”;</script> 阅读全文
posted @ 2013-06-12 16:31 helloweworld 阅读(123) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 48 下一页