title: Can a stack be accessed like an array?
body: <p>Currently in a program I am making I have to look at the top of a stack, and I was curious if I could do something along the lines of this?</p>
  
  <pre><code>int N, temp;
  N = stack.size();
  
  temp = stack[N];
  </code></pre>
  
  <p>Just a question, I'm not sure if a "pop" method would be the correct option in this situation.</p>