stack class : stack() fitter

Description

Get an instance with initial value.

Syntax

new stack()

Arguments

None.

Return value

ClassDescription
stackAn instance 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.