#include<bits/stdc++.h>
using namespace std;
struct fin
{
int year;
string month;
int day;
};
int main()
{
fin p=
{
2022,
"December",
31
};
cout<<"This year is "<<p.year<<",today is "<<p.month<<" "<<p.day<<"th.\n";
return 0;
}
这就是struct的用法,相信大家可以自己理解!