Most elegant way to reset a class
<p>For a class with subclasses or sctructures inside, what's the most ellegant way of reseting it?</p>

<pre><code>class attributes {
public:
   std::string address;
   short       port;
   std::vector&lt; std::string &gt; data;
   struct Foo foo;
};
</code></pre>

<p>what's is the most elegant in a loop, default operator = ou create an Reset method memoring 0 the structure <code>memset(...)</code>?</p>

<pre><code>   attributes obj, originalStateToResetObj;
   for(;;)
      //do stuff with obj
      obj.address = "172.0.0.1"
      //etc
      //reseting obj using operator=
      obj = originalStateToResetObj;
      // OR using Reset?
      obj.Reset();
   }
</code></pre>

<p>Other elegant suggestion?</p>
