title: Creating a new object and passing in method parameter
body: <p>In Java we can create and pass a new object to a method within its parameters like so:</p>
  
  <pre><code>wrapper.set_state( new Medium() );
  </code></pre>
  
  <p>What is the equivalent to this in C++?
  I suppose I could create the object before and then pass it, but being able to create it in the parameter would seem neater.</p>