标题:帮帮孩子吧,十一行怎么错了啊,如何纠正?
只看楼主
秃头弟弟
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2020-10-22
结帖率:0
已结贴  问题点数:20 回复次数:2 
帮帮孩子吧,十一行怎么错了啊,如何纠正?
#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();
}
搜索更多相关主题的帖子: case int break strcpy void 
2020-10-22 17:32
rjsp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:507
帖 子:8890
专家分:53117
注 册:2011-1-18
得分:10 
你这代码,喝醉了酒后写的吧?
差不过相当于一个非洲黑人,来中国旁听了一节幼儿园语文课,回家后用甲骨文写了篇古文,然后让大家点评。
2020-10-22 19:08
yunbo888
Rank: 2
等 级:论坛游民
帖 子:6
专家分:20
注 册:2020-10-21
得分:10 
2020-10-23 19:04



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-503582-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.714299 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved