using namespace std;//using namespace STD
The class Date
{
Private:
Int year;
Int the month;
int day;
Public:
Void the set ()
{
Cout<& lt;" Please enter the year/month/day: ";
Cin> Year> Month> Day;
}
Void the show ()
{
Cout<& lt;" Please enter the date: "& lt;
Void the add ()
{
If (the month==2)
{
If (year % 4==0 & amp; & Year % 100!=0 | | year % 400==0)//judgment leap year
{
If (day==29) {
The month=month + 1;
Day=1; }
The else
Day=day + 1;
}
The else {
If (day==28) {
The month=month + 1;
Day=1; }
The else
Day=day + 1;
}
}
If (the month==12)
{
If (day==31)
{
Year=year + 1;
The month=1;
Day=1;
}
The else
Day=day + 1;
}
If (the month==2 | | the month==4 | | the month 6==| | 9 month==| | the month==11)
{
If (day=30) {
The month=month + 1;
Day=1; }
}
The else
{
If (31) day={
The month=month + 1;
Day=1;
}
The else
Day=day + 1;
}
Cout
Void the cut ()
{
If (the month==3)
{
If (year % 4==0 & amp; & Year % 100!=0 | | year % 400==0)//judgment leap year
{
If (day==1) {
The month=the month - 1;
Day=29; }
The else
Day=day - 1;
}
The else {
If (day==1) {
The month=the month - 1;
Day=28; }
The else
Day=day - 1;
}
}
If (the month==1)
{
If (day==1)
{
Year=year - 1;
The month=12;
Day=31;
}
The else
Day=day - 1;
}
If (the month==2 | | the month==4 | | the month 6==| | 9 month==| | the month==11)
{
If (day=1) {
The month=the month - 1;
Day=30; }
}
The else
{
If (day=1) {
The month=the month - 1;
Day=31;
}
The else
Day=day - 1;
}
Cout
};
Int main ()//the main function of the main ()
{
Int choice;
The Date v.
V. et ();
V. how ();;
Do {
Cout<& lt;" Please select operation [0] reset date; [1] the day plus a day; [2] the day minus one day "& lt;
The switch (choice) {
Case 1: cout<& lt;" For the day plus a day after: "; Says v. dd (); break;
Case 2: cout<& lt;" After the day minus one day for: "; V.c ut (); break;
Case 0: v. et (); break;
}
} while (choice!=0);
Cout> & gt;" The input end!"> Endl;
System (" PAUSE ");//call library function system (), output system message
return 0;//return value of 0, return to the operating system
}
Should be how to solve the
D: \ stuty \ \ new folder yyy1. CPP (132) : error C2676: binary '& gt;> ':' class STD: : basic_ostream & lt; Char, struct STD: : char_traits & lt; char> 'does not define this operator or a conversion to a type acceptable to the predefined operator
An error occurred when execution cl. Exe. C
CodePudding user response:
The ~ thank you know how to solve