这个程序错误在哪里?#include using namespace std;class Date{public:void setDate(int y,int m,int d);void showDate();private:int year;int month;int year;};void Date::setDate(int y,int m,int d){year=y;month=m;day=d;}void Date::showDate(){cout

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/30 10:41:23
这个程序错误在哪里?#include using namespace std;class Date{public:void setDate(int y,int m,int d);void showDate();private:int year;int month;int year;};void Date::setDate(int y,int m,int d){year=y;month=m;day=d;}void Date::showDate(){cout
x]KPǿʠN/2MCDP|$2_0puj_fg;Y~n9?m 5{9wg]6Z0gv5/dEE)jr(|NT^M9!ksRE-/e$ʊΔY*F8zɟAS r D*Ⴃ*uaG<{ve9NIAߊ/t!ۉ @]E}dJHMxH * je5Qҡ}d%LژJ˝n@sxq3z \lX؛'wkf/;NWJ {!6Yuk(ZqgI^^w7wjcv b5zhI{(1gٍ&b[()?̷

这个程序错误在哪里?#include using namespace std;class Date{public:void setDate(int y,int m,int d);void showDate();private:int year;int month;int year;};void Date::setDate(int y,int m,int d){year=y;month=m;day=d;}void Date::showDate(){cout
这个程序错误在哪里?
#include
using namespace std;
class Date{
public:
void setDate(int y,int m,int d);
void showDate();
private:
int year;
int month;
int year;
};
void Date::setDate(int y,int m,int d)
{
year=y;
month=m;
day=d;
}
void Date::showDate()
{cout

这个程序错误在哪里?#include using namespace std;class Date{public:void setDate(int y,int m,int d);void showDate();private:int year;int month;int year;};void Date::setDate(int y,int m,int d){year=y;month=m;day=d;}void Date::showDate(){cout
私有成员只能用接口访问,在你的基础上把private改成public可以通过,或者用你的show接口,要不然不就白定义show了.在书上有详解的,别告诉我你木看.