How can I solve this error


C:\Martin\MalikChapter7\reverseStack\stackType.h:203:1: error: invalid use of template-name 'linkedStackType' without an argument list

linkedStackType::reverseStack(linkedStackType<Type> stack2)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
template<class Type>
  linkedStackType::reverseStack(linkedStackType<Type> stack2)
{
      nodeType *tmp = this->stackTop; //pointer tothe current stack top
      while(tmp->link != NULL)   //unwind till link is null
      {
           stack2.push(tmp->info);  //push current element info to stack2
           tmp = tmp->link;  //fall back one level
           if(tmp->link == NULL)  // last element in stack
           stack2.push(tmp->info);   //push last element
      }
}

  
Please provide minmal compilable code of you problem (with main()).

Note that stack2 is a copy of the provided stack, hence no changes will be applied to the provided stack.
Thanks its all sorted out
Topic archived. No new replies allowed.