Link Error : unresolved external symbol "public: __thiscall"
Ok this is not gonna be a simple one to explain since few classes are involved ... But, i'm goona start with the main class
Code:
#include "Fleet.h"
#include "Menu.h"
#include "Rental.h"
#include <conio.h>
using namespace std;
/* ------------------------------------------------------------------------------------------------
* Main
*/
int main()
{
Fleet fleet;
Rental rental;
/*** Create and Add Menu Items to the Menu list ***/
Menu menu(fleet, rental);
menu.CreateMainMenu();
menu.CreateFleetMenu();
menu.StartScreen();
menu.toFleetMenu(false);
/*** Execute menu until user quits.... ***/
do {
menu.choose();
}
while (!menu.done());
return 0;
}
/*** ERROR ****/
error LNK2019: unresolved external symbol "public: __thiscall Rental::~Rental(void)" (??1Rental@@QAE@XZ) referenced in function _main
error LNK2019: unresolved external symbol "public: __thiscall Rental::Rental(void)" (??0Rental@@QAE@XZ) referenced in function _main
: fatal error LNK1120: 2 unresolved externals
*/
Class Rental
Code:
#include "Contract.h"
#include <vector>
class Driver;
class Rental
{
private:
typedef std::vector<Contract> RentalContract;
typedef RentalContract::iterator ContractsIterator;
public:
Rental();
Rental(Driver&);
~Rental();
//RentalContract getRental();
void CreateNewContract();
void DeleteContract();
void ViewContract();
ContractsIterator find();
private:
RentalContract contracts;
Driver &driver;
};
/** Part of its CPP **/
include "Rental.h"
#include "Driver.h"
#include <iostream>
#include <algorithm>
#include <conio.h>
Rental::Rental(Driver& d) :
driver(d)
{}
Let me stop here perhaps you may pick up the fault already ...