我有一个错误作为标题,我删除了我所有的代码并保留了一个简单的代码,如下所示:
#include <iostream>
#include <ctime>
void main(){
// input Date from keyboard
unsigned char tmpDayOfWeek, tmpDay, tmpMonth;
unsigned int tmpYear;
printf("Please input your date:\n");
printf(" Day of Week (0 for Sunday, 1 for Monday,...): "); scanf("%d", &tmpDayOfWeek);
printf(" Day (1..31): "); scanf("%d", &tmpDay);
printf(" Month (1..12): "); scanf("%d", &tmpMonth);
printf(" Year (1..9999): "); scanf("%d", &tmpYear);
cin.get();
return;
}
但是这个错误仍然出现,任何人都可以帮我解决这个问题。我使用 VC++ 2005 和 Win 7 x64 谢谢,