Your indentation is misleading. Line 10 ends the definition of Stack<T>::StackNode. You need another pair of }; to end the definition of Stack<T> before you can define Stack<T>::Pop() and Stack<T>::Empty().
Sorry not everything went through.
Here it is:
[code]
#include<iostream>
#include<cassert>
#include<stack>
template <class T> class Stack{
public:
Stack();
Stack(const Stack<T>&S ; //copy constructor
~Stack();
void Push(T item);
Stack &operator=(const Stack<T>&S);
Stack *top;
private:
struct StackNode
{
T data;
StackNode *next;
};
template <class T> T Stack<T>::Pop( )
{
.
.
.
}
After that line, everywhere where the word:
template<class T> appears the error of shadowing comes up.
Sorry My mouse is not working well today so I battle to post the rest of the code.
I then get the errors posted above