首先,认识一下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)
方法一: sudo apt-get install nautilus-open-terminal 然后重启 方法二: Ubuntu中,默认右键菜单中没有“在终端中打开”。要想添加此菜单,可以在主目录中新建如下内容的脚本文件: [plain] view plain copy #!/bin/bash # Read More
posted @ 2018-04-04 18:41 findumars Views(1503) Comments(0) Diggs(0)
作者:潘安仁链接:https://www.zhihu.com/question/40720890/answer/87926792来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 建议先去了解GCC的内联汇编的格式,我之前也没接触过GCC的内联汇编,都是看intel的汇编 Read More
posted @ 2018-03-29 21:13 findumars Views(566) Comments(0) Diggs(0)