title: C++ Struct Default Call Value
body: <p>New to C++ here. Lets say I have a struct defined as:</p>
  
  <pre><code>struct Item {
    string name;
  }
  </code></pre>
  
  <p>In C++, is there a way where I can get the value of <code>name</code> by just calling the object?</p>
  
  <pre><code>Item item;
  item.name = "Andy"
  cout &lt;&lt; item; // --&gt; Output: "Andy"
  </code></pre>
  
  <p>Thanks!</p>