Separate declaration and defition of stack.