title: How should I pass this std::array<> to a function?
body: <pre><code>std::array&lt;LINE,10&gt; currentPaths=PossibleStrtPaths();
  LINE s=shortestLine(currentPaths);                       //ERROR
  </code></pre>
  
  <hr>
  
  <pre><code>LINE CShortestPathFinderView::shortestLine(std::array&lt;LINE,10&gt; *currentPaths)
  {
  std::array&lt;LINE,10&gt;::iterator iter;
  
  LINE s=*(currentPaths+1);                      //ERROR
  
  for(iter=currentPaths-&gt;begin()+1;iter&lt;=currentPaths-&gt;end();iter++)
  {
       if(s.cost&gt;iter-&gt;cost)
       s=*iter;
  }
  
  std::remove(currentPaths-&gt;begin(),currentPaths-&gt;end(),s);
  
      //now s contains the shortest partial path  
  return s; 
  
  
  }
  </code></pre>
  
  <p>At both those statements I'm getting the same error:  <code>no suitable conversion from  std::array&lt;LINE,10U&gt;*currentPaths to LINE</code> . Why is this so? Should I pass the array another way? I've also tried passing <em>currentPaths</em>  as a reference, but it tells me that a reference of the type cannot be initialized.</p>