#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
cout << "hello world" <<endl;
cin.get();
return 0;
}
计算程序执行时间
#include <iostream> #include <time.h> clock_t start_time = clock(); for (int i = 0; i < 10000; i++) { printf("%s","hello world"); } clock_t end_time = clock(); std::cout<<"excuting time is :"<<static_cast<double>(end_time - start_time)/CLOCKS_PER_SEC * 1000<<"ms"<<std::endl;