摘要: 在调试中,经常需要计算某一段代码的执行时间,下面给出两种常用的方式: 第一种:使用GetTickCount函数#include<iostream> #include<windows.h> int main() { DWORD start_time=GetTickCount(); { //此处为被测试代码 } DWORD end_time=GetTickCount(); cout<<"The run time is:"<<(end_time-start_time)<<"ms!"<<en 阅读全文
posted @ 2012-04-01 15:38 何解一直犯相同错误? 阅读(252) 评论(0) 推荐(0) 编辑