06 2012 档案

摘要:<!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 简单--生活 阅读(182) 评论(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 简单--生活 阅读(128) 评论(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 简单--生活 阅读(184) 评论(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 简单--生活 阅读(266) 评论(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 简单--生活 阅读(196) 评论(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 简单--生活 阅读(219) 评论(0) 推荐(0) 编辑
摘要:/*// 1 循环语句的老祖宗Goto语句#include <iostream>using namespace std;int main(){ int i= 1; if(i > 10){ //goto yes; } cout<<"*"<<i<<endl; i++; //goto yes; cout<<"程序结束"; cout<<"********\n";yes:; return 0;}*//*// 2 while语句#include <iostream 阅读全文
posted @ 2012-06-17 22:01 简单--生活 阅读(165) 评论(0) 推荐(0) 编辑
摘要:/*// 4 声明一个类#include <iostream>using namespace std;class Human{public: void GetStature(); void getWeight();private: int stature; int weigth;};int main(){ return 0;}*//*//6 定义一个对像#include <iostream>using namespace std;class human{public: void getStartue(){cout<<startue; } void setSt 阅读全文
posted @ 2012-06-17 22:00 简单--生活 阅读(201) 评论(0) 推荐(0) 编辑
摘要:/*// 4 什么是表达式#include <iostream>using namespace std;int main(){ for(int i=0; i<=60; i++) { if(i%6 == 0) { cout<<"\n"; } cout<<i<<"\t"; } return 0;}*//*// 5 赋值运算符与数学运算符#include <iostream>using namespace std;int main(){ int a=2; a = a *= 6; cout< 阅读全文
posted @ 2012-06-17 21:58 简单--生活 阅读(1074) 评论(0) 推荐(0) 编辑
摘要://1 C++数据类型#include <iostream>int add(int x, int y){ return x+y;}int main(){ int i=1, y=2; std::cout<<add(i,y); return 0;}// 2什么是变量#include <iostream>using namespace std;int main(){ int a = 35; cout<<"a的值是:"<<a<<endl; cout<<"请输入数值:"<&l 阅读全文
posted @ 2012-06-17 21:56 简单--生活 阅读(242) 评论(0) 推荐(0) 编辑
摘要:/****************************************** * 解析XML格式的字符串 * @param string $str * @return 解析正确就返回true,否则返回false *******************************************/ function xml_parser($str){ $xml_parser = xml_parser_create(); if(!xml_parse($xml_parser,$str,true)){ xml_parser_free($xml_parser); retur... 阅读全文
posted @ 2012-06-08 15:00 简单--生活 阅读(306) 评论(0) 推荐(0) 编辑

简单--生活(CSDN)
点击右上角即可分享
微信分享提示