C++ completely erase (or reset) all values of a struct?
<p>So, I was just wondering how could we completely erase or reset a structure so it could be reused?</p>

<p>I just typed this up, here you go:</p>

<pre><code>typedef struct PART_STRUCT
{
    unsigned int Id;
    std::string Label;
} Part;

typedef struct OBJECT_STRUCT
{
    std::vector&lt; unsigned char &gt; DBA;
    std::vector&lt; Part &gt; Parts;
    unsigned int Id;
} Object;

Object Engine;

// Initialize all members of Engine
// Do whatever with Engine
// ...
// Erase/Reset Engine value
</code></pre>
