overloaded member function是啥意思。
我建了两个类一个Date(int,int,int)在"Date.h"文件中
一个Employee(string,char,int,int,class Date,class Date)在"Employee"文件中
Employee类中参数有Date类。
"Date.h"头文件如下:
#ifndef _DATA_H_
#define _DATA_H_
。。。
。。。
#endif
Employee函数声明如下:
#include <iostream>
using namespace std;
#include<string>
using std::string;
#include"Date.h"
class Employee
{
public:
Employee(string,char,int,int,class Date,class Date);
。。。。。
。。。。。
}
Employee类的函数如下
#include "stdafx.h"
#include "Employee.h"
Employee::Employee(string name,char sex,int age,int wage,Date Date1(int year,int mounth,int day),Date Date2(int year,int mounth,int day))//这里出错
{
...
}
void Employee::setEmployeeDate(Date Date2(int year,int mounth,int day))//这里出错
{
....
}
编译时出错说 error C2511: 'Employee::Employee' : overloaded member function 'void (class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,char,int,int,class Date [/color[color=#FF0000]](__cdecl *)(int,int,,int))' not found in 'Employee'是啥意思。咋修改?
请高手指导下谢了。。