If I keep the empList[i].reqShift[i].StrInit(s); line in my program, I get an access violation during the deconstructor of the string of CEmployee. If I remove the name parameter or don't include that line, I have no problems.Code:class CEmployee { public: string name; Shift sArray[7]; } class Shift { public: int type; float start, end; Shift() : start(0), end(0), type(0) {}; void StrInit(string s) { type = -1; } }; vector<CEmployee> empList(7); string s; for(j=0; j<7; j++) { empFile >> s; empList[i].reqShift[i].StrInit(s); }