generic_stack
December 8, 2025 ยท View on GitHub
Shows how to use xtd::collections::generic::stack class.
Sources
Build and run
Open "Command Prompt" or "Terminal". Navigate to the folder that contains the project and type the following:
xtdc run
Output
five
four
three
two
one
Popping 'five'
Peek at next item to destack: four
Popping 'four'
Contents of the first copy:
one
two
three
Contents of the second copy, with duplicates and nulls:
one
two
three
stack2.contains("four") = false
stack2.clear()
stack2.count() = 0