* Michael:
[quoting signature]]
Please don't quote signatures -- corrected.
* Michael:
Alf P. Steinbach wrote:
>* Michael:
>>In real world, when to use class, container, class & container? It
seems to me that container is more useful to number chain, class is for
implementing complex porjects? Right? Please give your insights.
In C++ a container is a class.
Sorry for not clarifying my questions. I would like to know when shall
I create my own class or use STL container?
Should you choose the blonde or the brunette, that's the question.
Well, if you absolutely feel you have to choose one or the other, try
both, and choose the one that pleases you the most, or, be more
pragmatic and choose both. ;-) Seriously.
Generally the purpose of a class is to maintain a class invariant, a set
of relationships between the instance data members. The class invariant
is established by the class' constructor and maintained by every public
member function.
If a standard container doesn't give you the class invariant you want,
then a custom class is called for.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?