title: Passing Stack to Function
body: <p>So I'm playing around with stacks and I've filled one in my main function, but now I want to pass it to my other functions so I can traverse through it. I'm not sure what kind of data type to put into the prototype though so that it accepts it. Suggestions? Here's what I have:</p>
  
  <p>Main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  #include "stack.h"
  
  void displayStack(char &amp;stackRef);
  
  int main()
  {
      Stack&lt;char&gt; stack;
      stack.push('a');
      stack.push('b');
      stack.push('c');
  
      return 0;
  };
  
  void displayStack(char starRef)
  {
      // Cannot Get here - Errors!
  };
  </code></pre>
  
  <p>It's telling me I have too many arguments and it doesn't match argument list.</p>