Update inventory.cpp

Preliminary bug fixes before running program.