kelie

导航

2014年1月14日 #

输出控制中时间延迟的几种方法

摘要: (—)使用_sleep()函数#include using namespace std;_sleep(5*1000);//延时5秒(二)使用Delay(int time)函数#include void Delay(int time)//time*1000为秒数{clock_t now = clock();while( clock() - now sleep(5)//延迟5秒如果你想延迟一秒以内那么用#include void Delay(int time)//time*1000为秒数{clock_t now = clock();while( clock()... 阅读全文

posted @ 2014-01-14 22:41 kelie 阅读(1635) 评论(0) 推荐(0) 编辑

STL模板之_map,stack(计算矩阵相乘的次数)

摘要: #include #include #include using namespace std;struct Node { int row, col; };int main(){ int n; char name; map matrix; cout> n; cout> name; cin >> matrix[name].row >> matrix[name].col; } cout> exp) { int i,p; int count = 0; stack array; for(i = 0; i >p; if (p==0) break; else 阅读全文

posted @ 2014-01-14 17:48 kelie 阅读(253) 评论(0) 推荐(0) 编辑