title: Passing a variable to function for reference an array into
body: <p>I need to call function which contains many cases.</p>
  
  <p>I'd like to pass it a variable which can reference different arrays.</p>
  
  <p>This example demonstrates more clearly what I'm trying to achieve:</p>
  
  <pre><code>void bob(int debut, int fin, string flag){
       string arrayflag = "pfhistory_FR_" + flag;
       for (i = debut; i &lt; fin; i++){
           std::cout  &lt;&lt; arrayflag[i].DP &lt;&lt; endl                          
       }
   };
  </code></pre>