// Item.cpp: implementation of the Item class. // ////////////////////////////////////////////////////////////////////// #include "Item.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// Item::Item(const string &catalogID, const string &description, double price) { m_sCatalogID = catalogID; m_sDescription = description; m_nPrice = price; } bool Item::operator ==(const Item & I2) const // overload the equality operator { return m_sCatalogID == I2.m_sCatalogID; } ostream & operator <<(ostream & os, const Item & I) { os << I.m_sCatalogID << ", " << I.m_sDescription << ", " << I.m_nPrice; return os; }