注册 登录
编程论坛 C++教室

帮帮孩子吧,十一行怎么错了啊,如何纠正?

秃头弟弟 发布于 2020-10-22 17:32, 1274 次点击
#include<iostream.h>
class Deat
{
private:
    int month;
    int day;
    int year;
public:
    Date(int year= 0,int month= 0,int day= 0);
}
    Date std(int month)
    {
        string strcpy;
        switch(month)
        {
        case 1:strcpy="January";break;
        case 2:strcpy="February";break;
        case 3:strcpy="Mrach";break;
        case 4:strcpy="April";break;
        case 5:strcpy="May";break;
        case 6:strcpy="June";break;
        case 7:strcpy="July";break;
        case 8:strcpy="August";break;
        case 9:strcpy="September";break;
        case 10:strcpy="October";break;
        case 11:strcpy="November";break;
        case 12:strcpy="December";break;
        default:strcpy="error";break;
        }
        cout<<strcpy<<" "<<day<<","<<year<<endl;
    }
};

void PrintDate(void)const
{
    count << month << "-" << day <<"-"<< year << endl;
}
void main(void)
{

    Date today(10,16,2020);
    today.printdate1();
    today.printdate2();
}
2 回复
#2
rjsp2020-10-22 19:08
你这代码,喝醉了酒后写的吧?
差不过相当于一个非洲黑人,来中国旁听了一节幼儿园语文课,回家后用甲骨文写了篇古文,然后让大家点评。
#3
yunbo8882020-10-23 19:04
1