// Wrapper for cInventory SaveToFile function void SaveInvToFile(cInventory & inv, const char * filename) { ofstream file(filename); if (file.is_open()) { inv.SaveToFile(file); file.close(); } else cout << "Error: Unable to open " << filename << endl; }