I have a problem that is probably something very simple I'm overlooking. I am trying to build a stack and output it. It is compiling, but gives an error that isn't related to my main before it runs. I'm using the header <stack.h> and here is the way I'm trying to use it.
#include <iostream.h>
#include <stack.h>
void main()
{
Stack<int> s;
for (int i = 0;i<5;i++)
s.push(i);
cout<<s;
}
I'm doing something wrong, and I can't figure out what. If someone could show me an example of how to use the stack.h file, it would be greatly appreciated.