这个程序错误在哪里?#include using namespace std;class Date{public:voi
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/09/29 12:33:13
这个程序错误在哪里?
#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了.在书上有详解的,别告诉我你木看.
这个程序错误在哪里?#include using namespace std;class Date{public:voi
#include using namespace std; class A { public:A(){cout
#include using namespace std; class blah{ public:static int
#include using namespace std;class Box{public:Box(int a,int
#include using namespace std; class A{ public:A *next; int d
求大神纠错 C++#include using namespace std;class rectangle{public
一道类的程序题#include using namespace std;class obj{\x05 static in
注释行总是有错误#include using namespace std;class student{char name
这个哪里错了#include #include using namespace std;void strlen(stri
#include using namespace std; class myclass { int a,b; stati
X=xx,#include#includeusing namespace std;class point {public
#include#includeusing namespace std;class Vehicle{public:\x0