Home About Rice Downloads Documents Others Cooker CookerGX
Documents  >  Class  >  stack  >  stack()
stack class : stack() fitter

Description

Get a new instance of stack class with initial value.

Syntax

new stack()

Arguments

None.

Return value

ClassDescription
stackA new instance of stack class with initial value.

Sample code

stack newStack = new stack();

Notes

The initial value is an empty stack.

You can limit the class of elements by using "{}" in the fitter.

For example


stack{string} stringStack = new stack{string}();


The above example limits the elements of the stack to the string class.

If do not use the "{}", will be able to have an instance of any class as a element.

Links for reference

None.

Copyright © Rice All rights reserved.