Clang issues a more useful compiler error for this line:
inventoryitem *list[];
definition of variable with array type needs an explicit size or an initializer
In C++, you would be better to use one of the many containers available to you. E.g:
std::list<inventoryitem>