I have written the following code that I will post below. Each time I try to compile it I receive the following error.
1>main.obj : error LNK2001: unresolved external symbol "public: __thiscall OrderSet::OrderSet(void)" (??0OrderSet@@QAE@XZ)
1>C:\Users\Bill\Desktop\School1\c++\c++ spring cs2\program2\Debug\program2.exe : fatal error LNK1120: 1 unresolved externals
Note I am using Visual Studios C++ Express Edition 2008 I don't know if there is a problem with my code or something has happened in the compiler itself.
Code Below:
orderset.h
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
struct List{
int data;
List *next;
}; // end of struct
class OrderSet{
public:
OrderSet(); // default constructor
OrderSet(OrderSet &data); // copy constructor
~OrderSet(); // de-constructor
// Member functions
OrderSet union1();
OrderSet intersection();
OrderSet find();
OrderSet add();
OrderSet test();
OrderSet getADTA();
OrderSet getADTB();
OrderSet showADTA();
OrderSet showADTB();
void mainMenu();
private:
List a;
List b;
}; // end of class
*************************************
main.cpp
#include "orderset.h"
int main()
{
OrderSet m;
m.mainMenu();
return 0;
} // end of main
*************************************
orderset.cpp
#include "orderset.h"
OrderSet::~OrderSet()
{
} // end of de-constructor
//======================================
void OrderSet::mainMenu(){
cout << "i am the main menu" << endl;
}
************************************