You need to declare ostream& operator << (ostream& strm, const node* &obj )
as a friend
function to your node
class.
So inside your node class you will have
friend ostream& operator << (ostream& strm, const node* &obj );
and then in your cpp file you will have
ostream& operator << (ostream& strm, const node* &obj )
{
strm << "ItdID: " << obj.itemId << "\nItem Description: " << obj.itemDescription << "\nItem Quanity: " << obj.quanity
<< "\nWholesale Cost: $" << fixed << showpoint << setprecision(2) << obj.wholesale << "\nRetail Cost: $" << fixed << showpoint << setprecision(2) << obj.retail;
return strm;
}
This should fix your bug.