时间函数相关问题
#include “stdio.h”#include “stdlib.h”
#include “time.h”
int main( void )
{
long i = 10000000L;
clock_t start, finish;
double duration;
printf( "Time to do %ld empty loops is ", i );
start = clock();
while( i-- ) ;
finish = clock();
duration = (double)(finish - start)/CLOCKS_PER_SEC;
printf( "%f seconds\n", duration ); system("pause");
}
#include "time.h"
#include "stdio.h"
int main(void)
{
struct tm *ptr;
time_t lt;
lt =time(NUL);
ptr=gmtime(<);
printf(asctime(ptr));
printf(ctime(<));
return 0;
}
这2函数我是在网上看到的 为什么我复制到我的vc6.0上运行 老是错误呢? 第二个gmtime(<)函数中 形参为什么是<啊??