Copy Constructor stringstream

Hi,
I defined my own copy constructor, and one of the data members has type stringstream. I cannot figure out how to copy the stringstream.
1
2
3
4
5
inline Market::Market(Market const &cpy)
{
    price=cpy.price;
    receipt=cpy.receipt;
}

receipt is the stringstream, and the error is on line 4. Thanks for your help.
stringstream objects are not copyable. Why not just store the receipt as a normal string and use a stringstream temporarily when you need one?
Topic archived. No new replies allowed.