c++中怎样让一个整数值随着系统时间每秒中减一

2024-11-16 22:36:53
推荐回答(1个)
回答(1):

#include
#include
using namespace std;

int main(void)
{
time_t first, second;

cout<<"Please press Enter to start!"< getchar();

first = time( NULL );

cout<<"Please press Enter again to stop!"< getchar();

second = time( NULL );

cout<<"The during time is:"<
return 0;
}
试一下