How to implement dynamic element container in C++
<p>Given the following prototype, is it possible to implement it in C++?
I am looking for resources(books, web) that can give me some concrete ideas to implement it in C++.</p>

<pre><code>class Container
{
public:
    vector&lt;Element&gt; getElementsByCategory(Category _cate);    
    bool AddElement(Element _element);
    bool DelElement(Element _element);

private:    
    vector&lt;Element&gt; vec;
};

struct Element
{
    Category  cate;
    DataType  type;
    DataValue value;
};

Category can be CategoryA, CategroyB, CategoryC, etc.
DataType can be Date, int, float, double, string, etc.
DateValue is correspoding to DataType.
</code></pre>

<p>As you can see, the class <code>Container</code> can hold dynamic element each of different data type. The user is responsible for adding each different field(column in DB) to the <code>Container</code> and later <code>Container</code> provides way to return categorized data back to the user.</p>

<p>For example, the user can add Element of int type, Element of double type, and Element of Date type into container at the very beginning. Then later, the user would like to query all elements that belong to int type.</p>
