上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 82 下一页
摘要: C++Files: .h, .hh, .hppSource Files: .C, .cpp, .ccCFiles: .hSource Files: .c 阅读全文
posted @ 2010-03-11 16:18 greencolor 阅读(246) 评论(0) 推荐(0) 编辑
摘要: gcc is for compiling "c" source code, gcc also can use for c++ source codeand g++ is for compiling "c++" source code."g++" will automatically link the code with the C++ runtime library (libstdc++),but... 阅读全文
posted @ 2010-03-11 16:07 greencolor 阅读(151) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<string> usingnamespacestd; inlinestringdbtest(inta);//函数原形声明为inline即:内联函数 voidmain() { for(inti=1;i<=10;i++) { cout<<i<<":"<<dbtest(i)<... 阅读全文
posted @ 2010-03-10 23:11 greencolor 阅读(211) 评论(0) 推荐(0) 编辑
摘要: int main(int argc, char *argv[])== int main(int argc, char **argv)char *argv[] = {"hello","hi"}; char argv[] = {'h','e','l','l','o','h','i'};char *argv[]//是一个数组,存储char指针 char argv[] //是一个数组,存储charargc... 阅读全文
posted @ 2010-03-10 22:29 greencolor 阅读(457) 评论(0) 推荐(0) 编辑
摘要: Install ApacheTo start off we will install Apache.1. Open up the Terminal (Applications > Accessories > Terminal).2. Copy/Paste the following line of code into Terminal and then press enter:sudo... 阅读全文
posted @ 2010-03-10 12:15 greencolor 阅读(198) 评论(0) 推荐(0) 编辑
摘要: count,sizeofcount - 返回一个数组的元素个数。sizeof 是 count 的别名,功能和 count 一样,也是返回一个数组的元素个数。count 函数示例如下,下面的示例中,输出数组个元素个数,为6。sortsort - 给一个数组的元素排序。排序后,数组各元素原来的 key 也因为排序而改变。sort 函数示例如下:asortasort - 给数组的元素排序,保留每个元素原... 阅读全文
posted @ 2010-03-07 20:32 greencolor 阅读(5909) 评论(0) 推荐(1) 编辑
摘要: roundround - 对浮点数进行四舍五入。round 函数语法如下:其中参数 precision 表示小数点后面要保持的精度位数。如果不写参数 precision,表示四舍五入到整数位,比如:如果 precision 为2,表示四舍五入到小数点后2位。示例如下:如果参数 precision 为负数,表示四舍五入到小数点前。比如:floorfloor - 舍去法求整。floor 函数语法如下:... 阅读全文
posted @ 2010-03-07 20:20 greencolor 阅读(286) 评论(0) 推荐(0) 编辑
摘要: strlenstrlen 函数能得到一个字符串的长度。下面的示例中,得到的变量 $a 的长度为 8。trimtrim 函数的功能是将字符串的两边的空格都去掉。比如下面示例中变量 $a 的值是 ' abcdef ',字符串两边各有一个空格, trim 之后,由于去掉字符串两边的两个空格,字符串的长度就是6。ltrimltrim 函数的功能是将字符串左边的空格去掉。rtrimrtrim 函数的功能是将... 阅读全文
posted @ 2010-03-07 20:16 greencolor 阅读(212) 评论(0) 推荐(0) 编辑
摘要: PHP 变量 (Variables)PHP 的变量必须以 $ 符开始。PHP 的变量声明语法如下:用 echo 输出一个字符串单引号指定字符串指定一个字符串最简单的方法是用单引号(字符 ')围起来。比如如果一个字符串里含有单引号,怎么办呢?这时候就需要用到一个转义符,反斜杠 (字符 \)。在字符串里的单引号之前要加一个反斜杠,也就是说,在字符串里,用 \' 来表示单引号。示例如下:PHP 单行注释... 阅读全文
posted @ 2010-03-07 20:11 greencolor 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Run .bin file in Linux / UNIXChange the permission of the file you downloaded to be executable. Type the following command:$ chmod +x file.binStart the installation process or run .bin file.Type the f... 阅读全文
posted @ 2010-03-06 23:58 greencolor 阅读(134) 评论(0) 推荐(0) 编辑
上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 82 下一页