preternatural

2007年10月3日

C++把string转换成double,求整数a/b精确到小数点后任意位

摘要: //cppTest.cpp:定义控制台应用程序的入口点。//#include"stdafx.h"#include<cassert>#include<iomanip>//求a/b,输出结果小数点后的前n位voidDiv(inta,intb,intn){usingnamespacestd;assert(n>=0);if(a<b)cout<<"0.";el... 阅读全文

posted @ 2007-10-03 20:56 preternatural 阅读(6870) 评论(0) 推荐(0) 编辑

2007年9月20日

计算算术表达式

摘要: 程序在VS2005下调试成功。//cppTest.cpp:定义控制台应用程序的入口点。//#include"stdafx.h"#include<iostream>#include<cstdio>#include<cstdlib>#include<string>#include<cassert>#include<cmath>#i... 阅读全文

posted @ 2007-09-20 21:09 preternatural 阅读(257) 评论(1) 推荐(0) 编辑

2007年8月1日

最近写的几个类

摘要: Database.csusingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usi... 阅读全文

posted @ 2007-08-01 20:59 preternatural 阅读(189) 评论(0) 推荐(0) 编辑

马的棋盘遍历

摘要: 一个方棋盘(当然也可以是矩形的,这里我主要是为了声明数组方便把它定义成方棋盘),上面有一只马,打印出它走过这些所有位置各一次的全部可能走法。使用的是递归,没有用回溯。 阅读全文

posted @ 2007-08-01 20:51 preternatural 阅读(549) 评论(0) 推荐(0) 编辑

2007年7月25日

关于一点感受

摘要: 没有标签,与其它网站的标签方式不太一致,不容易找到。验证后才能注册,其实可以用AJAX自动检测邮件地址,如果怕用户滥注册,可以发用户验证地址,用户点验证后才允许,网站不应该限制人。吸引高人是一种好做法,但是这种方式不一定都是高人,没有有效的检验机制。亮点就是支持代码定义功能,文件上传功能。 阅读全文

posted @ 2007-07-25 20:12 preternatural 阅读(137) 评论(0) 推荐(0) 编辑

导航