首先,认识一下clock()和GetTickCount(): 一、clock()clock()是C/C++中的计时函数,而与其相关的数据类型是clock_t。在MSDN中,查得对clock函数定义如下:clock_t clock(void) ;简单而言,就是该程序从启动到函数调用占用CPU的时间。这 Read More
posted @ 2018-04-07 06:48
findumars
Views(8342)
Comments(0)
Diggs(0)
(—)使用_sleep()函数 例如:_sleep(200);//延时200毫秒 (二)使用delay(int time)函数 (需要自己实现,编译器里面没有) [cpp] view plain copy /// @brief 程序延时 /// @param[in] msec : 毫秒 /// @r Read More
posted @ 2018-04-07 06:47
findumars
Views(5843)
Comments(0)
Diggs(0)
[cpp] view plain copy [cpp] view plain copy 注:unique函数功能是去除相邻的重复元素,注意是相邻,所以必须先使用sort函数。还有一个容易忽视的特性是它并不真正把重复的元素删除。之所以说比不真正把重复的元素删除,因为unique实际上并没有删除任何元素 Read More
posted @ 2018-04-07 06:46
findumars
Views(1387)
Comments(0)
Diggs(0)