Имею такие две ошибки. VC++ 2015. Я так понимаю ошибка касаться класса, но не могу понять в чем именно проблема.
Ошибка 1
error LNK2019: ссылка на неразрешенный внешний символ "public: __thiscall Employee1::Employee1(int,int,int)" (??0Employee1@@QAE@HHH@Z) в функции _main C:\Users\User\Documents\Visual Studio 2012\Projects\ConsoleApplication2\ConsoleApplication2\Исходный код.obj test
Ошибка 2
error LNK1120: неразрешенных внешних элементов: 1 C:\Users\User\Documents\Visual Studio 2012\Projects\ConsoleApplication2\Debug\test.exe test
Вот код:
#include "iostream"
using namespace std;
class Employee1
{
public:
Employee1 (int Age, int YOS, int Sal);
~Employee1 () {}
void SetAge(int Age) {age = Age;}
void SetYOS(int YOS) {yearsOfService = YOS;}
void SetSalary(int Sal) {Salary = Sal;}
int GetAge() const {return age;}
int GetYOS() const {return yearsOfService;}
int GetSalary() const {return Salary;}
private:
int age;
int yearsOfService;
int Salary;
};
int main()
{
Employee1 asdfask(12,12,12);
Employee1 sadasdfasdf(12,12,12);
return 0;
}