用字符串比较函数strcmp()如#include#include"string.h" void main(){ int n; n=strcmp("2010-04-30","2010-05-02");//再根据n进行判断 printf("%d",n);}
time.h中定义了time_t这种数据类型(实际就是long),在time.h中定义一些函数可以取系统时间