no overloaded function takes 3 parameters及类中数组初始化出现的问题~~~~
class worker{
public:
worker(string dep,string nam,int n,int x);//定义构造函数
worker(){}
void set(int &);
int choiceoption();
void displayall(int m);
int yanzheng(int ,int );//验证员工号
string department;
string name;
int num;
int situ1[13];
int situ2[13];
int situ3[13];
int situ4[13];
int situ5[13];
int situ6[13];
int situ7[13];
};
class KQdk:virtual public worker
{
public:
void show1();//显示菜单函数
KQdk(string dep,string nam,int n,int x):
worker(dep,nam,n,x){}
void run1(worker a,int choice,int m);//choice<=2
void run2(worker &,int m);//choice=3
void GLYZ(int &);
void tim (const struct tm *&);//计算值(时间函数)
};
class KQTJ:virtual public worker
{
public:
void month_tongji(worker a,int m);
KQTJ(string dep,string nam,int n,int x):
worker(dep,nam,n,x){}
void year_tongji(worker a);
void display_KQ(worker a,int m,int &,int &,int& );//m为月份;q,w,e分别为全勤,旷工》2,迟到或早退》5的标志
void KQTJ_display();
};
class menu:public KQdk,public KQTJ
{
public:
menu(string dep,string nam,int n,int x):
KQdk(dep,nam,n,x),KQTJ(dep,nam,n,x){}//构造函数
void pasue();
void menu_welcome();//欢迎界面
void menu_start();//菜单显示界面
void menu_end();//退出界面
void menu_run();//运行函数
int menu_display(worker (&a)[11],int);
};
这是我的4个类。。。在定义
worker staff[11]={worker("wewe","wewe",45)worker('a','a',1),
worker('a','b',2),
worker('a','c',3),
worker('a','d',4),
worker('a','e',5),
worker('b','f',6),
worker('b','g',7),
worker('b','h',8),
worker('b','i',9),
worker('b','j',10)};
显示题目那个问题~~~怎么回事ne ???还有。这样定义数组能行不???谢谢啊