标题:帮帮孩子吧,十一行怎么错了啊,如何纠正?
取消只看楼主
秃头弟弟
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2020-10-22
结帖率:0
已结贴  问题点数:20 回复次数:0 
帮帮孩子吧,十一行怎么错了啊,如何纠正?
#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



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




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

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