#include<windows.h>
//程序开始前
DWORD start_time=GetTickCount();
//程序结束以后
DWORD end_time=GetTickCount();
cout<<“The run time is:”<<(end_time-start_time)<<“ms!”<<endl;//输出运行时间
2.
new每次申请对象都会占用较多的时间,在使用的时候需要注意
#include<windows.h>
//程序开始前
DWORD start_time=GetTickCount();
//程序结束以后
DWORD end_time=GetTickCount();
cout<<“The run time is:”<<(end_time-start_time)<<“ms!”<<endl;//输出运行时间
2.
new每次申请对象都会占用较多的时间,在使用的时候需要注意