Im getting a bunch of errors from the compiler.Not sure what im doing wrong....
Header File
#include<iostream>
using namespace std;
#ifndef STACK_H
#define STACK_H
template<class stackElem, int maxSize=80>
class stack
{
public:
stack()
{
top=-1;
}
bool push(const stackElem &item);
};
#include "stack.cpp"
#endif
this is the .cpp file
#include "stack.h"
using namespacestd;
template<class stackElem,int maxSize>
bool stack<stackElem,maxSize>::push(const stackElem &item)
{
if(isfull())
return false;
elements[top]=item;
top++;
return true;
}