标题:大家帮忙看看这个程序~!
取消只看楼主
lionmusicyj
Rank: 1
等 级:新手上路
帖 子:98
专家分:0
注 册:2008-9-20
结帖率:100%
 问题点数:0 回复次数:0 
大家帮忙看看这个程序~!
#include <stdio.h>
#include <time.h>

void wait ( int seconds )
{
  clock_t endwait;         //小弟这里看不懂了~!不知道这个函数是什么意思~!
  endwait = clock () + seconds * CLOCKS_PER_SEC ;
  while (clock() < endwait) {}
}

int main ()
{
  int n;
  printf ("Starting countdown...\n");
  for (n=10; n>0; n--)
  {
    printf ("%d\n",n);
    wait (1);
  }
  printf ("FIRE!!!\n");
  return 0;
}

在网上查到了一些有关ctime.h的解释,但是都是英文的,所以理解的不是很透彻~!希望大吓们能稍微给小弟解释一下~!谢谢了!!!
搜索更多相关主题的帖子: include seconds return 英文 
2008-11-13 00:17



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-243932-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.394786 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved