已知年月日,如何确定是星期几? C/C++库、SDK、MFC均可年份的范围是1800年至2199年 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 COleDateTime ct;int iyear,imonth,idate;......ct.SetDate(iyear,imonth,idate);int iw=ct.GetDayOfWeek(); #include <time.h>#include <stdio.h>#include <sys/types.h>#include <string.h>void main(){ char *weekday[]={"星期天","星期一","星期二","星期三","星期四","星期五","星期六"}; time_t ltime; struct tm *tm1; time(<ime); tm1 = localtime(<ime); printf("今天%s",weekday[tm1->tm_wday]);} 谢volcary(冰火山)大侠救命之恩!To sans: CTime不行——它的年份限制1970-2038 release模式recvfrom 无法接受到数据,debug模式下可以 工具条停靠,我能理解,但是主框架窗口停靠,是什么意思呢? 从采集卡读数据需要哪些方面的知识 关于CSocket在多线程 会引发一个中断的问题 怎么把函数中的指针的值(内容)返回出来 EXE给DLL传递参数?应该怎么传啊 请教关于com的几个术语翻译 有啥办法能解决VC6.0 在 32bit XP上的内存2G限制?? 程序员35岁以后干什么? 帮帮忙啦!!!(很棘手哦) 这段代码为什么运行不正常? 寻SoftICE
int iyear,imonth,idate;
......
ct.SetDate(iyear,imonth,idate);
int iw=ct.GetDayOfWeek();
#include <stdio.h>
#include <sys/types.h>
#include <string.h>void main()
{
char *weekday[]={"星期天","星期一","星期二","星期三","星期四","星期五","星期六"};
time_t ltime;
struct tm *tm1; time(<ime);
tm1 = localtime(<ime);
printf("今天%s",weekday[tm1->tm_wday]);
}