Home News DOC Class DL Others Cooker
Class  >  stack  >  stack{int}(string)
stack class : stack{int}(string) fitter

Description

Gets an instance initialized by the initialization string.

Syntax

new stack{int}(string initStr)

Arguments

ClassNameDescription
stringinitStrInitialization string.

Return value

ClassDescription
stack{int}Initialized stack.

Sample code

1:

/**Sample**concat**-----------------------

2:

{0, 124, 125, 126, 127,}

3:

-----------------------------------------------*/

4:

rice rr;

5:

stack{int} newIntStack = new stack{int}(rr.Sample);

Notes

The format of the initialization string is:

A string that starts with "{" and ends with "}".

Separate the items with commas.

Allows a comma to follow the last item.

Allows white space before and after the initialization string and item.


The int can be set as items. Specify in the format of literal.

Links for reference

None.

Copyright © Rice All rights reserved.