title: C++ Using default values for parameters
body: <p>I am new to C++ (from C# background) and I have a function with the following signature </p>
  
  <pre><code> void AddBenchNode(ref_ptr&lt;Group&gt; root ,ref_ptr&lt;Node&gt; benches, bool setAttitude = false, float scale_x =.15, float scale_y =15, float scale_z = 15, int positionx = 250, int positiony = 100, int positionz =0 )
  {
  
  }
  </code></pre>
  
  <p>But when I try to call the code as below, I get an error which says function does not take 4 arguments. </p>
  
  <pre><code>//then I try to call my function like so
  AddBenchNode(root, benches, false, 250);
  </code></pre>
  
  <p>but I instead get the following error message</p>
  
  <p><strong>error C2660: 'AddBenchNode' : function does not take 3 arguments</strong> </p>
  
  <p>Would appreciate an explanation of how C++ does this instead? </p>