Vector Troubles in C++
I am currently working on a project that deals with a vector of objects of a People class. The program compiles and runs just fine, but when I use the debugger it dies when trying to do anything with the PersonWrangler object. I currently have 3 different classes, one for the person, a personwrangler which handles all of the people collectively, and a game class that handles the game input and output. 

Relevant code:

    class Game
    {
    public:
        Game();
        void gameLoop();
        void menu();
        void setStatus(bool inputStatus);
        bool getStatus();
        PersonWrangler* hal;
    private:
        bool status;
    };

which calls outputPeople where it promptly dies from a baadf00d error. 

    void Game::menu()
    {
        hal->outputPeople();
    }

where hal is an object of PersonWrangler type

    class PersonWrangler
    {
    public:
        PersonWrangler(int inputStartingNum);
        void outputPeople();  
        vector<Person*> peopleVector;
        vector<Person*>::iterator personIterator;  
        int totalPeople;
    };

and the outputPeople function is defined as

    void PersonWrangler::outputPeople()
    {
        int totalConnections = 0;
        cout << " Total People:" << peopleVector.size() << endl;
        for (unsigned int i = 0;i < peopleVector.size();i++)
        {
            sort(peopleVector[i]->connectionsVector.begin(),peopleVector[i]->connectionsVector.end());
            peopleVector[i]->connectionsVector.erase( unique (peopleVector[i]->connectionsVector.begin(),peopleVector[i]->connectionsVector.end()),peopleVector[i]->connectionsVector.end());
            peopleVector[i]->outputPerson();
            totalConnections+=peopleVector[i]->connectionsVector.size();
        }
        cout << "Total connections:" << totalConnections/2 << endl;
    }


Vector Troubles in C++
===

I am currently working on a project that deals with a vector of objects of a People class. The program compiles and runs just fine, but when I use the debugger it dies when trying to do anything with the PersonWrangler object. I currently have 3 different classes, one for the person, a personwrangler which handles all of the people collectively, and a game class that handles the game input and output. 

Relevant code:

    class Game
    {
    public:
        Game();
        void gameLoop();
        void menu();
        void setStatus(bool inputStatus);
        bool getStatus();
        PersonWrangler* hal;
    private:
        bool status;
    };

which calls outputPeople where it promptly dies from a baadf00d error. 

    void Game::menu()
    {
        hal->outputPeople();
    }

where hal is an object of PersonWrangler type

    class PersonWrangler
    {
    public:
        PersonWrangler(int inputStartingNum);
        void outputPeople();  
        vector<Person*> peopleVector;
        vector<Person*>::iterator personIterator;  
        int totalPeople;
    };

and the outputPeople function is defined as

    void PersonWrangler::outputPeople()
    {
        int totalConnections = 0;
        cout << " Total People:" << peopleVector.size() << endl;
        for (unsigned int i = 0;i < peopleVector.size();i++)
        {
            sort(peopleVector[i]->connectionsVector.begin(),peopleVector[i]->connectionsVector.end());
            peopleVector[i]->connectionsVector.erase( unique (peopleVector[i]->connectionsVector.begin(),peopleVector[i]->connectionsVector.end()),peopleVector[i]->connectionsVector.end());
            peopleVector[i]->outputPerson();
            totalConnections+=peopleVector[i]->connectionsVector.size();
        }
        cout << "Total connections:" << totalConnections/2 << endl;
    }

