06 2013 档案

摘要:一、利用stringstream对象 stringstream在int或float类型转换为string类型的方法中已经介绍过, 这里也能用作将string类型转换为常用的数值类型。 #include <iostream>#include <sstream> //使用stringstream需要引入这个头文件using namespace std;//模板函数:将st... 阅读全文
posted @ 2013-06-05 15:42 菜鸟加贝的爬升 阅读(561) 评论(0) 推荐(0)
摘要:1、GetTickCount()函数1.1 函数介绍 该函数是windows里面常用来计算程序运行时间的函数;1.2 使用方法: DWORD dwStart = GetTickCount(); //这里运行你的程序代码 DWORD dwEnd = GetTickCount(); 则(dwEnd-dwStart)就是你的程序运行时间, 以毫秒为单位。这个函数只精确到55ms,1个tick就是55ms。1.3 代码示例 1 #include <iostream> 2 #include <windows.h> 3 using namespace std; 4 int main 阅读全文
posted @ 2013-06-02 14:56 菜鸟加贝的爬升 阅读(1874) 评论(0) 推荐(1)