Map with structs

Can i make a make out of a struct i will make(for key AND for value) g struct cup{int capacity,price};
and then map<cup,cup> m1; i should write a comparison function also, but how? Thanks
Certainly, but as you so you'll need to write a comparison function. Check out this page's section on operator overloading:
thanks a lot
Topic archived. No new replies allowed.