I am using the #include<list>
header with the following declaration of a databaseclass
for my employees, which will be read by an iterator class.
The abstract base class has 2 pure virtual functions both of which are overloaded in derived classes...
then i declare my list and databse but i am getting errors that i cannot seem to break
there are 4 errors 6 warnings...and some of them point to the STL list file.Code:employee1.cpp c:\program files\microsoft visual studio\vc98\include\list(29) : error C2259: 'employee' : cannot instantiate abstract class due to following members: C:\Program Files\Microsoft Visual Studio\MyProjects_M\Mcd_Project\employee1.cpp(43) : see declaration of 'employee' C:\Program Files\Microsoft Visual Studio\MyProjects_M\Mcd_Project\employee1.cpp(214) : see reference to class template instantiation 'std::list<class employee,class std::allocator<class employee> >' being compiled c:\program files\microsoft visual studio\vc98\include\list(29) : warning C4259: 'void __thiscall employee::print(void)' : pure virtual function was not defined C:\Program Files\Microsoft Visual Studio\MyProjects_M\Mcd_Project\employee1.cpp(51) : see declaration of 'print' C:\Program Files\Microsoft Visual Studio\MyProjects_M\Mcd_Project\employee1.cpp(214) : see reference to class template instantiation 'std::list<class employee,class std::allocator<class employee> >' being compiled c:\program files\microsoft visual studio\vc98\include\list(29) : warning C4259: 'double __thiscall employee::pay(void)' : pure virtual function was not defined C:\Program Files\Microsoft Visual Studio\MyProjects_M\Mcd_Project\employee1.cpp(52) : see declaration of 'pay' C:\Program Files\Microsoft Visual Studio\MyProjects_M\Mcd_Project\employ
anyhow here is the syntax that is my problem..can anyone help me?
Code:typedef list< employee > EMPLOYEE_LIST; typedef EMPLOYEE_LIST::iterator LISTiterator; class Employee_Database { public: Employee_Database( const char* filename); ~Employee_Database(); EMPLOYEE_LIST dataList; char databaseFilename[256]; char dataInputFilename[256]; void showEmployeeMenu(); void getMenuSelection(); void Run( char* filename ); private: void Hire(); void Fire(); void Retire(); }; //database constructor Employee_Database::Employee_Database( char* filename) { strcpy( databaseFilename, filename); strcpy( dataInputFilename, "" ); dataList.clear(); }



LinkBack URL
About LinkBacks


