title: Using parameterized functions c++
body: <p>say I have a C++ function</p>
  
  <pre><code>int foo(int x, int y){
     return x+y ;
  }
  </code></pre>
  
  <p>Is there a way to create a "parameterized" version of this function?</p>
  
  <p>What I mean is that starting from foo() I would like to define function pointers that have y fixed to a specific values, the equivalent of creating the function foo2() like this:</p>
  
  <pre><code>int foo2(int x){
    return foo(x,2);
  }
  </code></pre>
  
  <p>If not with function pointers, which can be an alternative to have a similar behaviour?</p>