Here is part of the code:
class Inventory {
    public:
        void PrintInventory();
        void AddItemToInventory();
        void UpdateItemQtyInInventory();
        void RemoveItemFromInventory();
    private:
        vector<Item*> inventory;
};
void Inventory::PrintInventory() {
    unsigned int i = 0;
    if (inventory.size() == 0) {
        cout << "No items to print." << endl;
    } else {
        for (i=0; i < inventory.size(); ++i) {
            cout << i << " - ";
            inventory.at(i)->Print();
        }
    }
    return;
}
void Inventory::AddItemToInventory() {
    string usrInptName = "";
    string usrInptQntyStr = "";
    string usrInptPriceStr = "";
    string usrInptOptn = "default";
    istringstream inSS;
    int usrInptQnty = 0;
    int usrInptPrice = 0;
    string usrInptOther = "";
    bool valid = false;
    while (valid == false) {
        cout << "Enter (b)ook or (p)roduce: ";
        getline(cin, usrInptOptn);
        if (usrInptOptn.size() == 0) {
                continue;
        } else if (usrInptOptn.at(0) == 'p') {
            Produce* prdct;
            cout << "Enter name of new produce: ";
            getline(cin, usrInptName);
            cout << "Enter the price per item: $";
            getline(cin, usrInptPriceStr);
            inSS.str(usrInptPriceStr);
            inSS >> usrInptPrice;
            inSS.clear();
            cout << "Enter quantity: ";
            getline(cin, usrInptQntyStr);
            inSS.str(usrInptQntyStr);
            inSS >> usrInptQnty;
            inSS.clear();
            cout << "Enter expiration date: ";
            getline(cin, usrInptOther);
            prdct = new Produce;
            prdct->SetName(usrInptName);
            prdct->SetPrice(usrInptPrice);
            prdct->SetQuantity(usrInptQnty);
            prdct->SetExpiration(usrInptOther);
            inventory.push_back(prdct);
            valid = true;
        } else if (usrInptOptn.at(0) == 'b') {
            Book* prdct;
            cout << "Enter name of new book: ";
            getline(cin, usrInptName);
            cout << "Enter the price per item: $";
            getline(cin, usrInptPriceStr);
            inSS.str(usrInptPriceStr);
            inSS >> usrInptPrice;
            inSS.clear();
            cout << "Enter quantity: ";
            getline(cin, usrInptQntyStr);
            inSS.str(usrInptQntyStr);
            inSS >> usrInptQnty;
            inSS.clear();
            cout << "Enter Author: ";
            getline(cin, usrInptOther);
            prdct = new Book;
            prdct->SetName(usrInptName);
            prdct->SetPrice(usrInptPrice);
            prdct->SetQuantity(usrInptQnty);
            prdct->SetAuthor(usrInptOther);
            inventory.push_back(prdct);
            valid = true;
        } else {
            cout << "Invalid choice\n";
        }
    }
    return;
}
Inventory* inventory;
int main() {
    string usrInptOptn = "default";
    while (true) {
        // Get user choice
        cout << "\nEnter (p)rint, (a)dd, (u)pdate, (r)emove, or (q)uit: ";
        getline(cin, usrInptOptn);
        // Process user choice
        if (usrInptOptn.size() == 0) {
            continue;
        } else if (usrInptOptn.at(0) == 'p') {
            inventory->PrintInventory();
        } else if (usrInptOptn.at(0) == 'a') {
            inventory->AddItemToInventory();
        } else if (usrInptOptn.at(0) == 'u') {
            inventory->UpdateItemQtyInInventory();
        } else if (usrInptOptn.at(0) == 'r') {
            inventory->RemoveItemFromInventory();
        } else if (usrInptOptn.at(0) == 'q') {
            cout << "\nGood bye." << endl;
            break;
        }
    }
    return 0;
}
The program crashes when it is running the functions. I don't have the slightest idea why. The AddItemtoIventory function runs through it's entirety before the program crashes while the other one ,and the others, just crashes.
 
    