#include <stack>
using namespace std;

template <class ElementType>
class Stack : public stack<ElementType>
{
public:
/* --- Add several copies of a value to the stack if there is room---
 *
 * Receive:   The BoundedStack containing this function 
 *              (implicitly)
 *            A value to be added to a BoundedStack, and
 *              number of times value is to be added
 * Pass back: The BoundedStack (implicitly), with value added
 *              number times at its top, provided there is room
 * Output:    Overflow message if no room for value
 **************************************************************/
void RepeatedPush(const ElementType & value, int number);  
};

// Definition of RepeatedPush() 
template <class ElementType>
inline void Stack<ElementType>::
RepeatedPush(const ElementType & value, int number)
{
  for (int i = 1; i <= number; i++)
     push(value);
} 
