title: How to "properly" translate C# properties to C++?
body: <p>I have written a chart library in C#. I'm writing the exact same library, but for C++, as a learning project. The main issue I'm having right now is translating all of the C# properties to C++. Originally, I was planning on just writing out all the getters and setters as functions but, because of the way my library is structured, it makes the code a bit hard to read. Let me explain with an example:</p>
  <p>If I wanted to change the minimum value of the X Axis for the first subplot, I'd do something like this in C#:</p>
  <pre><code>myChart.Subplots[0].Axes.X.Bounds.Min = 5;
  </code></pre>
  <p>In C++, the same code would look like this:</p>
  <pre><code>myChart.GetSubplot(0).GetAxes().GetXAxis().GetBounds().SetMin(5);
  </code></pre>
  <p>Maybe I'm too used to C#, but this just looks very wrong to me. In the C# version you can just glance over the code and immediately see what's going on, whereas the C++ one is really long and convoluted. Initially I thought about just making everything public, but not only is this a bad idea, but I'd also like to make some of the getters and setters private.</p>
  <p>What should I do? Should I stick to what I'm doing currently? Should I completely restructure my library to be more &quot;C++&quot;-like? Is there an alternative method that I'm unaware of?</p>