上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 49 下一页
摘要: 加个<fieldset></fieldset>就可以了。 阅读全文
posted @ 2012-07-02 13:53 简单--生活 阅读(297) 评论(0) 推荐(0)
摘要: // 4 单一继承/*#include <iostream>using namespace std;class fatcher{private: int height, width;public: void setHeight(int h){ this->height = h; } void setWidth(int w){ this->width = w; } void show() { cout<<"身高="<<height<<" 体重="<<width<<endl; 阅读全文
posted @ 2012-07-02 00:39 简单--生活 阅读(214) 评论(0) 推荐(0)
摘要: //1 运算符重载#include <iostream>using namespace std;class num{public: num(){ n=1;} ~num(){} int get()const{ return n;} void set(int x){ n = x;}private: int n;};int main(){ num n; n.set(11); cout<<n.get()<<endl; //n++; return 0;}/*//2 在成员函数中实现自加#include <iostream>using namespace s 阅读全文
posted @ 2012-07-02 00:36 简单--生活 阅读(367) 评论(0) 推荐(0)
摘要: <?phpecho "xxd";//var_dump($_SERVER);$u=$_SERVER["REQUEST_URI"]; //提取地址var_dump($u);echo "<BR><BR>";$u=str_ireplace('http://','',$u); //去掉http://标识var_dump($u);echo "<BR><BR>";$u=strstr($u, '/');var_dump($u);e 阅读全文
posted @ 2012-07-01 15:38 简单--生活 阅读(193) 评论(0) 推荐(0)
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf- 阅读全文
posted @ 2012-06-26 23:09 简单--生活 阅读(185) 评论(0) 推荐(0)
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf- 阅读全文
posted @ 2012-06-26 23:08 简单--生活 阅读(131) 评论(0) 推荐(0)
摘要: JS 数据类型转换方法主要有三种转换函数、强制类型转换、利用js变量弱类型转换。1. 转换函数:js提供了parseInt()和parseFloat()两个转换函数。前者把值转换成整数,后者把值转换成浮点数。只有对String类型调用这些方法,这两个函数才能正确运行;对其他类型返回的都是NaN(Not a Number)。在判断字符串是否是数字值前,parseInt()和parseFloat()都会仔细分析该字符串。parseInt()方法首先查看位置0处的 字符,判断它是否是个有效数字;如果不是,该方法将返回NaN,不再继续执行其他操作。但如果该字符是有效数字,该方法将查看位置1处的字符,进 阅读全文
posted @ 2012-06-19 17:53 简单--生活 阅读(187) 评论(0) 推荐(0)
摘要: /*//1 函数的重载 普通函数的重载#include <iostream>using namespace std;void func(int);void func(long);void func(float);void func(double);int main(){ int a = 1; long b = 100000; float c = 2.1; double d = 2.1415926; func(a); func(b); func(c); func(d); return 0;}void func(int a){ cout<<"int: a=&quo 阅读全文
posted @ 2012-06-17 22:08 简单--生活 阅读(272) 评论(0) 推荐(0)
摘要: // 1 什么是引用//引用也是C++的初学者比较容易迷惑的,它几乎拥用指针所有的功能,但是语法更加简单//本单我们就来不官瘾引用,并且分清它与指针的区别/*#include <iostream>using namespace std;int main(){ int num; //mum是num的别名,这两个变量是一个变量,只不过 名字不同而已 //这就好像李四有个名号叫李大嘴,大家称呼李四指的是李四这个人,称呼李大嘴也是指李四这个人 //李四和李大嘴都是一个人,只是名字出现了不同 //所以,我们对mum的操作实际就是对num的操作 //这里要注意事项的是,别名mum前面的符号&a 阅读全文
posted @ 2012-06-17 22:06 简单--生活 阅读(201) 评论(0) 推荐(0)
摘要: /*//1 什么是地址#include <iostream>using namespace std;int main(){ int i=0; cout<<&i<<endl; return 0;}*//*// 2 用指针保存地址#include <iostream>using namespace std;int main(){ int i=1; int *p; p = &i; cout<<"&i:"<<&i<<endl; cout<<"p: 阅读全文
posted @ 2012-06-17 22:04 简单--生活 阅读(224) 评论(0) 推荐(0)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 49 下一页
简单--生活(CSDN)