Q:

Unhandled exception within my menu

I am currently getting a unhandled exception in my code and I have no idea why. This is the first time I am using more than one class together. 
At the moment I am trying to put user input into a string from another class. I am trying to input the user input into a string called name in the class below 
#ifndef SHIP_H
#define SHIP_H
#include "ApplicationMenu.h"
#include <string>
class Ship
{
public:
    Ship(void);
    ~Ship(void);

    std::string _size;
    std::string _shipName;
    std::string name;
};

#endif

Into the following function which is ran in main
#include "ApplicationMenu.h"
#include "Ship.h"
#include <string>
#include <sstream>

class Ship;

#include <iostream>

using namespace std;

ApplicationMenu::ApplicationMenu(void) { userChoice = 0; }

ApplicationMenu::~ApplicationMenu(void) { }

void ApplicationMenu::displayMenu() {

    cout << "Welcome to the Port." << endl << "Please select one of the
        following options : " << endl
        << "1: Dock Ship" << endl;
    cin >> userChoice;
    switch (userChoice)
    {
    case 1:

        Ship*   ship;

        ship->name;

        cout << "Please enter the name of your ship your wish to dock: ";
        cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
        getline(cin, ship->name);

        cout << ship->name;
        break;
    }
}

Can anyone please advise why I am getting error?
Edit: 
This error was because of an uninitialised pointer which was due to the lack of knowledge about pointers in C++. Although this was answered by the community this link would prove helpful for future viewers. http://www.cplusplus.com/doc/tutorial/pointers/

A:

You have an uninitialized pointer Ship* ship;.  You either need to use Ship*  ship = new Ship(); or declare the ship as Ship ship;

