clock_t clock( void );Calculates the processor time used by the calling processhead file is Return Valueclock returns the number of clock ticks of elapsed processor time. The returned value is the product of the amount of time that has elapsed since
参考书目:C/C++规范设计简明教程——思维训练、上级实验指导,P216
目的:编写Clock类,同时学习operator重载符的使用
第一步:建立win32工程,项目名称为:TestClockClass
第二步:添加Clock类,头文件Clock.h如下:
#pragma once
#define _CRT_SECURE_NO_WARNINGS
#include
#include
#include
#include
using namespace std;
class Clock
{
pri