Why am I getting segmentation fault when I am passing a string called name
with contents joel
into:
void person::setName(string newName)
{
personName = newName;
}
Header file:
class person {
public:
int getID();
string getName();
void setID(int newID);
void setName(string newName);
private:
int personID;
string personName;
};
The function call is by a child, although I dont see how that could cause an issue.