title: Can I implement .ToString() on C++ structs for debugging purposes?
body: <p>In C#, if I define a struct, I can also override ToString(). Then when I'm debugging and I add a watch or hover my mouse over an instance of the struct, the tooltip will be the computed ToString() rather than the type name of the struct.</p>
  
  <p>Can I do that in C++ and/or C++/CLI somehow? That is, can I define a method as part of the struct (or do anything else) that will cause the watch-value/tooltip to display a string of my choosing? The default string rendering in Visual Studio for C/C++ is a list of all the struct's field values (or as many as can be jammed into the little box).</p>
  
  <p>My types all C-style structs. (It was actually written in C before I converted the files to .cpp and fixed some type issues so I could run it in CLI.) Here's an example struct:</p>
  
  <pre><code>struct other_dollars_node
  {
      struct other_dollars_node *next_other_dollars;
      override *overrides;    
      long     other_dollars_id;
      tm       effective_date;
      double   amount;
  }
  </code></pre>
  
  <p>I have very little experience with C++/CLI -- most of my experience has been with native C/C++ and C#. I'm using Visual Studio 2013.</p>
  
  <p><strong>Update: since almost all the existing code uses native C syntax, and I would prefer a solution that works without having to refactor it, the CLI aspect may be less important.</strong></p>