Missing template arguments before 's' C++ : <p>Well I am doing an assignment but not sure what my problem is </p>

<p>this is my assignment</p>

<p>Instructions You have two parts to this assignment.  The parts are related, but different in their implementation.  To better understand the assignment itself, it may be helpful to go back through the book, slides, notes, etc. and do implementations of the regular array-based and linked list-based Stack, along with the Stack ADT. </p>

<p>Part I 
One widespread use of stacks is to provide the undo operation, familiar to us from many different applications.  While support for undo can be implemented with an unbounded stack (one that keeps growing and growing as long as memory permits), many applications provide only limited support for such an undo history.  In other words, the stack is fixed-capacity. 
When such a stack is full, and push is invoked, rather than throwing an exception, a more typical approach is to accept the pushed element at the top, while removing the oldest element from the bottom of the stack to make room.  This is known as “leaking.”  Note that this does not mean that the ADT exposes a method to allow removal from the bottom directly.  This is only performed when the stack becomes full. 
For this part, you are to give an implementation of such a LeakyStack abstraction, using some array-based implementation. 
Note that you must create a Leaky Stack interface, and then use the C++ : operator to implement that interface (using public inheritance) with your LeakyArrayStack implementation.  See the Interface specified near the end of the assignment instructions. </p>

<p>Part II  Repeat Part I, but use a singly linked list instead of an array for the actual data storage, and allow for a maximum capacity specified as a parameter to the constructor.  </p>

<p>NOTES: • Both the array-based and linked-list based Leaky Stacks should use the same LeakyStackInterface, specified below.  Remember – this is a LeakyStack ADT.  It specifies what the LeakyStack does, not how.  So, the interface should not be different in order to provide an implementation.   • Use public inheritance in both Parts • You should write a SinglyLinkedList class first, before trying to do part II o Then, use containment (aggregation or composition, a has-a relationship) to implement the part II</p>

<p>I GOT TO USE THE INTERFACE IN THE PICTURE</p>

<p>this is my code</p>

<pre><code>    #include &lt;iostream&gt;
     #ifndef LEAKYStacksINTERFACE
     #define LEAKYStacksINTERFACE
      #define cap 10
     using namespace std;



     template&lt;typename ItemType&gt;
     class LeakyStacksInterface
      {  public:
      //returns whether Stacks is empty or not
     virtual bool isEmpty() const = 0;

     //adds a new entry to the top of the Stacks
     //if the Stacks is full, the bottom item is removed
     //or "leaked" first, and then the new item is set to the top
     //---&gt; If the Stacks was full when the push was attempted, return false
     //---&gt; If the Stacks was not full when the push was attempted, return true
    virtual bool push(const ItemType&amp; newEntry) = 0;

     //remove the top item
     //if the Stacks is empty, return false to indicate failure
     virtual bool pop() = 0;

      //return a copy of the top of the Stacks
   virtual ItemType peek() const = 0;

  //destroys the Stacks and frees up memory
   //that was allocated
    // virtual ~StacksInterface() {}
   };

template&lt;typename ItemType&gt;
struct node
{
    int data;
    struct node *next;
};




template&lt;typename ItemType&gt;
class Stacks : public LeakyStacksInterface&lt;ItemType&gt;
{

    struct node&lt;ItemType&gt; *top;

    public:
            int size;
            ItemType *myArray;

    Stacks()
    {
        top=NULL;
        size = 0;
        myArray = new ItemType[cap];
    }

    ~Stacks() {
        size = 0;
    }

    public:
   // pure virtual function providing interface framework.
    bool isEmpty() const {

        return(size == 0);

    }
 bool push(const ItemType&amp; newEntry) {
        if(size == cap) {
            for(int i = 0; i &lt; size-1; i++) {
                myArray[i] = myArray[i+1];
            }
            myArray[size-1] = newEntry;
            return false;
        }
 }
    ItemType peek() const {
        return myArray[size-1];
    }
     void display()
   {
      cout&lt;&lt;"Stacks: [ ";
      for(int i=size-1; i&gt;=0; i--)
      {
         cout&lt;&lt;myArray[i]&lt;&lt;" ";
      }
      cout&lt;&lt;" ] "&lt;&lt;endl;
   }
};


int main()
{
    Stacks s;

   int choice;

    while(1)

    {

        cout&lt;&lt;"n-----------------------------------------------------------";

        cout&lt;&lt;"nttSTACK USING LINKED LISTnn";

        cout&lt;&lt;"1:PUSHn2:POPn3:DISPLAY STACKn4:EXIT";

        cout&lt;&lt;"nEnter your choice(1-4): ";

        cin&gt;&gt;choice;

        switch(choice)

        {

            case 1:

                s.push();

                break;

            case 2:

                s.pop();

                break;

            case 3:

                s.show();

                break;

            case 4:

                return 0;

                break;

            default:

                cout&lt;&lt;"Please enter correct choice(1-4)!!";

                break;

        }

    }

    return 0;
}

#endif
</code></pre>

<p>HERE ARE MY ERRORS :
ERROR:missing template arguments before 's'
ERROR:expected ';' before 's'
ERROR:'s' was not delcared in this scope</p>

<p>please help!
Thank You!</p>

<p><a href="https://i.stack.imgur.com/0Dx5A.png" rel="nofollow noreferrer">INTERFACE PICTURE</a></p>
