title: Does this coding style belong to an older version of C++?
body: <p>I come across this code in my older books.  I tried to run it in Visual Studio 2019, but it gave me an error:</p>
  <blockquote>
  <p>volume function does not take zero arguments</p>
  </blockquote>
  <p>Is this because the code is old, or the code is wrong?</p>
  <pre class="lang-cpp prettyprint-override"><code>#include&lt;iostream&gt;
  using namespace std;
  
  class Cylinder
  {
  private:
      const double pi = 3.14;
      double r, h;
  public:
      void ro(double radius) {
          r = radius;
      }
      void ho(double height) {
          h = height;
      }
      double volume(double r, double h)
      {
          return pi * r * r * h;
      }
  };
  
  int main()
  {
      Cylinder s;
      s.ro(1);
      s.ho(2);
      cout &lt;&lt; s.volume();
      return 0;
  }
  </code></pre>