Ошибка компоновщика LNK2001
Когда я пытаюсь создать объект, я получаю ошибку LNK2001 в Visual Studio:Я думаю, что проблема с конструктором, поскольку изменение конструктора приводит к изменению ошибки.
Customer bob("Bob", "25 Bob Lane", "01bob82", "M", "bob/bob/bob");
Эта строка дает эту ошибку:
Error 1 error LNK2001: unresolved external symbol "public: __thiscall
Customer::Customer(class std::basic_string,class std::basic_string,class std::basic_string,class std::basic_string,class std::basic_string)" (??0Customer@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?
$allocator@D@2@@std@@0000@Z) D:\Dropbox\Work\C++\C++ Assignment\C++
Assignment\driver.obj
Класс клиента, который содержит конструктор:
#pragma once
#include "l_list.h"
#include "Account.h"
#include
using namespace std;
class Customer
{
private:
l_list accounts;
string name;
string address;
string telNo;
string sex;
string dob;
public:
Customer(string name, string address, string telNo, string sex, string dob)
{
Customer::name = name;
Customer::address = address;
Customer::telNo = telNo;
Customer::sex = sex;
Customer::dob = dob;
}
void createAccount()
{
cout < "What type of account?";
}
};