title: How do I assign a default value to a function parameter that is a function? C++
body: <p>Let's say you have a function like this:</p>
  
  <pre><code>int Function(int a = 5, int b = 10){
  ...
  }
  </code></pre>
  
  <p>When you call the same function with fewer parameters then it should have, for example:</p>
  
  <pre><code>int var = Function(8);
  </code></pre>
  
  <p>'a' becomes 8, and 'b' gets the default value 10;</p>
  
  <p>With this in mind, let's say I have another function called Function3 that receives another function as its argument:</p>
  
  <pre><code>    int Function3(int x, int Function2 (int)){
          ...
      int m = Function2(x);
          ...
      return m;
      }
  </code></pre>
  
  <p>How do I set the default function (function2) that should be called if I do not send any function as an argument to Function3 (using the lambda functions)? </p>
  
  <p>So if I do this: </p>
  
  <pre><code>int ver = Function3(y);
  </code></pre>
  
  <p>instead of this:</p>
  
  <pre><code>int ver = Function3(y,std::sin)
  </code></pre>
  
  <p>How do I tell it to, for example, multiply the number with 3 if nothing has been sent as a third argument? (and if it has to use that function to work with x and y).</p>