can anyone please point out what's wrong with the files linking?
i have this compiling errors:
1>c:\documents and settings\lih\my documents\visual studio 2005\projects\employee\employee\hourlyemployee.cpp(3) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\documents and settings\lih\my documents\visual studio 2005\projects\employee\employee\hourlyemployee.cpp(4) : error C2550: 'HourlyEmployee' : constructor initializer lists are only allowed on constructor definitions
1>c:\documents and settings\lih\my documents\visual studio 2005\projects\employee\employee\hourlyemployee.cpp(6) : warning C4508: 'HourlyEmployee' : function should return a value; 'void' return type assumed
------------------------------------------ first file-----------------------------------------
# ifndef EMPLOYEE_H
# define EMPLOYEE_H
# include <string>
# include <iostream>
using namespace std;
namespace employeeTry
{
class Employee
{
public:
Employee();
Employee(string, string, string);
void setLastName(string);
void setFirstName(string);
void setSSN(string);
string getFirstName();
string getLastName();
string getSSN();
void output();
private:
string lastName;
string firstName;
string ssn;
};
}//end of employeeTry
#endif
---------------------------------------first file end----------------------
# ifndef hourlyEmployee_h
# define hourlyEmployee_h
# include "employee.h"
# include <string>
namespace employeeTry
{
class HourlyEmployee: public Employee
{
public:
HourlyEmployee();
HourlyEmployee(string,string,string,double,double);
private:
double hourlyRate;
double hours;
};
}
#endif
--------------------------------- second file end (hourlyEmployee)--------------------
# include "hourlyEmployee.h"
HourlyEmployee::HourlyEmployee(): Employee(), hourlyRate(0), hours(0)
{
}
/*
HourlyEmployee::HourlyEmployee(string ln, string fn, string ss, double hr, double h): lastName(ln), firstName(fn), ssn(ss), hourlyRate(hr), hours(h)
{
}
*/
----------------------------end of the 3rd file (hourlyEmployee.cpp file)