I have some problem inside my project:
I have a class named Item that represents item inside a store, it has three attitudes like string of name and it's cost. in the main program I'm using set of items (set<Item>
) and the problem is when I'm trying to print the set using the copy algorithm:
copy(items.begin(), items.end(), ostream_iterator<Item>(cout, " ## "));
the problem is that the compiler sends me this error:
Error 1 error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const Item' (or there is no acceptable conversion)
I really don't know why its happen to me, help please ?