A
Anonymous
I am writing a date manipulation library. I need a container that
requires each element to be unique, and also a container that is
'sortable'. After inserting the various elements ino the class, I would
like top sort them in ascending order.
I am undecided as to whether to use std::vector (which checks to ensure
uniqueness) or to use std::set class - any ideas on pros and cons?
Incidentally, if anyone knows a good online tutorial on std::set, please
let me know - the SGI docs are not too helpful (i.e. no real examples),
and google is not coming up with anything too useful either
requires each element to be unique, and also a container that is
'sortable'. After inserting the various elements ino the class, I would
like top sort them in ascending order.
I am undecided as to whether to use std::vector (which checks to ensure
uniqueness) or to use std::set class - any ideas on pros and cons?
Incidentally, if anyone knows a good online tutorial on std::set, please
let me know - the SGI docs are not too helpful (i.e. no real examples),
and google is not coming up with anything too useful either