Getting an error, need some help.

Yes using the setters did fix it! I do have one more question, I was supposed to make a function called int Initialize() that sets the value of all elements of the array to 0. I'm not quite sure what I'm supposed to be returning from this function, so I just returned 0. When I do this, I get a bunch of linker errors..

int EmployeeCollection::Initialize()
{
for (int i = 0; i < ARRAY_SIZE; i++)
{
    EmpArray[i].setId(0);
    EmpArray[i].setSalary(0);
}

return 0;
}

Error 1 error LNK1120: 1 unresolved externals C:\Users\TROPiCALRUBi\Documents\Visual Studio 2013\Projects\TROPiCALRUBi.bcs370.hw1\Debug\TROPiCALRUBi.bcs370.hw1.exe 1 1 TROPiCALRUBi.bcs370.hw1

Error 2 error LNK1120: 1 unresolved externals C:\Users\TROPiCALRUBi\Documents\Visual Studio 2013\Projects\TROPiCALRUBi.bcs370.hw1\Debug\TROPiCALRUBi.bcs370.hw1.exe 1 1 TROPiCALRUBi.bcs370.hw1

Error 3 error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Employee::getAuthor(void)" (?getAuthor@Employee@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) already defined in Employee.obj C:\Users\TROPiCALRUBi\Documents\Visual Studio 2013\Projects\TROPiCALRUBi.bcs370.hw1\TROPiCALRUBi.bcs370.hw1\EmployeeCollection.obj TROPiCALRUBi.bcs370.hw1

Error 4 error LNK2019: unresolved external symbol "public: __thiscall Employee::~Employee(void)" (??1Employee@@QAE@XZ) referenced in function "public: __thiscall EmployeeCollection::EmployeeCollection(void)" (??0EmployeeCollection@@QAE@XZ) C:\Users\TROPiCALRUBi\Documents\Visual Studio 2013\Projects\TROPiCALRUBi.bcs370.hw1\TROPiCALRUBi.bcs370.hw1\EmployeeCollection.obj TROPiCALRUBi.bcs370.hw1

/r/learnprogramming Thread Parent